Fixed memcache support for durations greater than 30 days. Fixes #6085

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8022 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
TommyO 2009-02-11 23:00:19 +00:00
parent b1b67c811c
commit 5026a6c89f
2 changed files with 15 additions and 2 deletions

View file

@ -100,8 +100,8 @@ class MemcacheEngine extends CacheEngine {
*/
function write($key, &$value, $duration) {
$expires = time() + $duration;
$this->__Memcache->set($key.'_expires', $expires, $this->settings['compress'], $duration);
return $this->__Memcache->set($key, $value, $this->settings['compress'], $duration);
$this->__Memcache->set($key.'_expires', $expires, $this->settings['compress'], $expires);
return $this->__Memcache->set($key, $value, $this->settings['compress'], $expires);
}
/**
* Read a key from the cache