summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorIvan Tcholakov <ivantcholakov@gmail.com>2014-08-18 11:40:26 +0200
committerIvan Tcholakov <ivantcholakov@gmail.com>2014-08-18 11:40:26 +0200
commitff4d114346a9c09df6d877e7d683155e5868d9e0 (patch)
tree21f88d3db777f1272ddd9eb9fb51695bb79f0a24 /system/libraries
parent52b32530a8503d7da29c24ff72701b6eef28742d (diff)
Cache_redis: Refactoring if delete() method.
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index 26de61db8..c1f593d27 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -133,13 +133,13 @@ class CI_Cache_redis extends CI_Driver
*/
public function delete($key)
{
- if ($result = ($this->_redis->delete($key) === 1))
+ if ($this->_redis->delete($key) === 1 && array_search($key, $this->_serialized, TRUE) !== FALSE)
{
- // This is for not leaving garbage keys within the Redis auxilary set.
$this->_redis->sRemove('_ci_redis_serialized', $key);
+ return TRUE;
}
- return $result;
+ return FALSE;
}
// ------------------------------------------------------------------------