diff options
author | Sean Fisher <srtfisher@gmail.com> | 2012-06-14 20:32:17 +0200 |
---|---|---|
committer | Sean Fisher <srtfisher@gmail.com> | 2012-06-14 20:32:17 +0200 |
commit | ee112692c0e893dbe1d03b7ee62da6860db7310c (patch) | |
tree | e2253383121a0f6b1d80684ccbc470d41c8f4fa7 | |
parent | f11a1939c25de1e327c7c02001c8fbd1ec1fc7b4 (diff) |
A TTL of 0 will keep the cache persistant.
-rw-r--r-- | system/libraries/Cache/drivers/Cache_file.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index 08231963e..028875b7d 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -73,7 +73,7 @@ class CI_Cache_file extends CI_Driver { $data = unserialize(file_get_contents($this->_cache_path.$id)); - if (time() > $data['time'] + $data['ttl']) + if ($data['ttl'] > 0 AND time() > $data['time'] + $data['ttl']) { unlink($this->_cache_path.$id); return FALSE; |