diff options
Diffstat (limited to 'system/libraries/Cache/drivers')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_file.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index c50043660..e515eebf1 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -151,13 +151,12 @@ class CI_Cache_file extends CI_Driver { { return FALSE; } - - $data = read_file($this->_cache_path.$id); + + $data = read_file($this->_cache_path.$id); $data = unserialize($data); - + if (is_array($data)) { - $data = $data['data']; $mtime = filemtime($this->_cache_path.$id); if ( ! isset($data['ttl'])) @@ -166,11 +165,11 @@ class CI_Cache_file extends CI_Driver { } return array( - 'expire' => $mtime + $data['ttl'], + 'expire' => $mtime + $data['ttl'], 'mtime' => $mtime ); } - + return FALSE; } |