diff options
-rw-r--r-- | system/libraries/Cache/drivers/Cache_file.php | 11 | ||||
-rw-r--r-- | user_guide/changelog.html | 8 |
2 files changed, 13 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; } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index a8f69af36..c3a7e4c2a 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -57,6 +57,14 @@ Change Log <h1>Change Log</h1> +<h2>Version 2.1.3</h2> +<p>Release Date: Not Released</p> + +<h3>Bug fixes for 2.1.3:</h3> +<ul> + <li>Fixed a bug (#1543) - <a href="libraries/caching.html#file">File-based Caching</a> method <samp>get_metadata()</samp> used a non-existent array key to look for the TTL value.</li> +</ul> + <h2>Version 2.1.2</h2> <p>Release Date: June 29, 2012</p> |