summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers
diff options
context:
space:
mode:
authorIvan Tcholakov <ivantcholakov@gmail.com>2014-08-18 12:52:44 +0200
committerIvan Tcholakov <ivantcholakov@gmail.com>2014-08-18 12:52:44 +0200
commitd245f0610cb8dc0f559866a85286b39c35d5d910 (patch)
treeb12e5a0f95ca4ab63d009b4bc41a73cf04ddf7a6 /system/libraries/Cache/drivers
parentff4d114346a9c09df6d877e7d683155e5868d9e0 (diff)
Cache_redis: Polishing.
Diffstat (limited to 'system/libraries/Cache/drivers')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index c1f593d27..9cb789eb0 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -109,13 +109,10 @@ class CI_Cache_redis extends CI_Driver
$this->_redis->sAdd('_ci_redis_serialized', $id);
}
- else
+ elseif (($index_key = array_search($id, $this->_serialized, TRUE)) !== FALSE)
{
- if (($index_key = array_search($id, $this->_serialized, TRUE)) !== FALSE)
- {
- unset($this->_serialized[$index_key]);
- $this->_redis->sRemove('_ci_redis_serialized', $id);
- }
+ unset($this->_serialized[$index_key]);
+ $this->_redis->sRemove('_ci_redis_serialized', $id);
}
return ($ttl)
@@ -295,7 +292,7 @@ class CI_Cache_redis extends CI_Driver
$this->_redis->auth($config['password']);
}
- // Initialize the index of selialized values.
+ // Initialize the index of serialized values.
$this->_serialized = $this->_redis->sMembers('_ci_redis_serialized');
if (empty($this->_serialized))