Skip to content

Commit

Permalink
Removing _expires keys made with Memcache cache engine. These did not…
Browse files Browse the repository at this point in the history
… add any value as Memcache already handles expiration of keys. Fixes #871
  • Loading branch information
markstory committed Aug 16, 2010
1 parent 686b9c2 commit 0865679
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions cake/libs/cache/memcache.php
Expand Up @@ -105,7 +105,6 @@ function init($settings = array()) {
*/
function write($key, &$value, $duration) {
$expires = time() + $duration;
$this->__Memcache->set($key . '_expires', $expires, $this->settings['compress'], $expires);
return $this->__Memcache->set($key, $value, $this->settings['compress'], $expires);
}

Expand All @@ -117,11 +116,6 @@ function write($key, &$value, $duration) {
* @access public
*/
function read($key) {
$time = time();
$cachetime = intval($this->__Memcache->get($key . '_expires'));
if ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime) {
return false;
}
return $this->__Memcache->get($key);
}

Expand Down

0 comments on commit 0865679

Please sign in to comment.