diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 19fbdc0cae..4007cb0caa 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -226,6 +226,10 @@ public function save($id, $data, $ttl = 60, $raw = FALSE) $this->_redis->{static::$_sRemove_name}('_ci_redis_serialized', $id); } + if ($ttl) { + $this->_redis->expireAt($id, time() + $ttl); + } + return TRUE; }