diff options
-rw-r--r-- | system/libraries/Cache/drivers/Cache_redis.php | 6 |
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; } // ------------------------------------------------------------------------ |