Merge remote-tracking branch 'origin/2.2-redis-engine' into 2.2-redis-engine

This commit is contained in:
Jose Lorenzo Rodriguez 2012-04-11 23:24:39 -04:30
commit e73bb27450

View file

@ -77,9 +77,9 @@ class RedisEngine extends CacheEngine {
try {
$this->_Redis = new Redis();
if (empty($this->settings['persistent'])) {
$return = $this->_Redis->connect($this->settings['server']);
$return = $this->_Redis->connect($this->settings['server']);
} else {
$return = $this->_Redis->pconnect($this->settings['server']);
$return = $this->_Redis->pconnect($this->settings['server']);
}
} catch (RedisException $e) {
return false;
@ -114,7 +114,7 @@ class RedisEngine extends CacheEngine {
*/
public function read($key) {
$value = $this->_Redis->get($key);
if (is_numeric($value)) {
if (ctype_digit($value)) {
$value = (int) $value;
}
if ($value !== false && is_string($value)) {