diff options
author | Ivan Tcholakov <ivantcholakov@gmail.com> | 2014-08-18 11:40:26 +0200 |
---|---|---|
committer | Ivan Tcholakov <ivantcholakov@gmail.com> | 2014-08-18 11:40:26 +0200 |
commit | ff4d114346a9c09df6d877e7d683155e5868d9e0 (patch) | |
tree | 21f88d3db777f1272ddd9eb9fb51695bb79f0a24 /system/libraries/Cache/drivers | |
parent | 52b32530a8503d7da29c24ff72701b6eef28742d (diff) |
Cache_redis: Refactoring if delete() method.
Diffstat (limited to 'system/libraries/Cache/drivers')
-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; } // ------------------------------------------------------------------------ |