diff options
author | Mathew White <mafoo@Saturn.local> | 2015-03-22 13:46:49 +0100 |
---|---|---|
committer | Mathew White <mafoo@Saturn.local> | 2015-03-22 13:46:49 +0100 |
commit | 01015d910f4b3361153c00173ba2998d0b312ba7 (patch) | |
tree | b2d9078b2686cad358ec4e17a73878f942d20704 /system/libraries/Cache/drivers/Cache_redis.php | |
parent | 737a5660c09e844d44969d1b7e8165b5f0296e37 (diff) |
Fixed redis cache save logic
It was trying to use sAdd as a check if the key was created, but that will return false if it is already present in the set.
Diffstat (limited to 'system/libraries/Cache/drivers/Cache_redis.php')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_redis.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 5236556d9..a35fbf6d2 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -111,7 +111,7 @@ class CI_Cache_redis extends CI_Driver { if (is_array($data) OR is_object($data)) { - if ( ! $this->_redis->sAdd('_ci_redis_serialized', $id)) + if ( ! $this->_redis->sIsMember('_ci_redis_serialized', $id) && ! $this->_redis->sAdd('_ci_redis_serialized', $id)) { return FALSE; } |