summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-06-17 00:09:29 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-06-17 00:09:29 +0200
commit5ad6ba8dbd8ae7fcaddc2f289ddea8ce99811214 (patch)
treecfac57260c776e9e5a6abbfac897cb087aabae8d /system/libraries/Cache/drivers
parentd60e700640c2a67f74acff090b94d06117bfc203 (diff)
parentee112692c0e893dbe1d03b7ee62da6860db7310c (diff)
Merge pull request #1479 from srtfisher/develop
A TTL of 0 will keep the cache persistant.
Diffstat (limited to 'system/libraries/Cache/drivers')
-rw-r--r--system/libraries/Cache/drivers/Cache_file.php2
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;