From 52b32530a8503d7da29c24ff72701b6eef28742d Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Mon, 18 Aug 2014 12:30:04 +0300 Subject: Cache_redis, save() method: An optimization, moving sRemove call. --- system/libraries/Cache/drivers/Cache_redis.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'system/libraries/Cache/drivers') diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index b5387c064..26de61db8 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -114,9 +114,8 @@ class CI_Cache_redis extends CI_Driver if (($index_key = array_search($id, $this->_serialized, TRUE)) !== FALSE) { unset($this->_serialized[$index_key]); + $this->_redis->sRemove('_ci_redis_serialized', $id); } - - $this->_redis->sRemove('_ci_redis_serialized', $id); } return ($ttl) -- cgit v1.2.3-24-g4f1b