merged branch vicb/memcache/fix (PR #3363)
Commits -------b95284e
[Profiler] Fix memcache(d) Discussion ---------- [Profiler] Fix memcache(d) storages This fixes an ambiguity... The memcache(d) storages have a `$lifetime` option. The name indicates that we are talking about a ttl (in seconds). This is wrong is `$lifetime` > 2592000 (=30 days), see http://fr.php.net/manual/en/memcache.set.php. Doctrine is also [affected](e9ab2d2cca
). The ambiguity also exists in the session storage but to a lesser extend as those storage directly use memcache(d) options rather than a `$lifetime`. @drak could you confirm ? Hopefully the Cache Component will get it right (#3211).
This commit is contained in:
commit
3f76d0f60f
@ -63,7 +63,7 @@ class MemcacheProfilerStorage extends BaseMemcacheProfilerStorage
|
||||
*/
|
||||
protected function setValue($key, $value, $expiration = 0)
|
||||
{
|
||||
return $this->getMemcache()->set($key, $value, false, $expiration);
|
||||
return $this->getMemcache()->set($key, $value, false, time() + $expiration);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,7 +67,7 @@ class MemcachedProfilerStorage extends BaseMemcacheProfilerStorage
|
||||
*/
|
||||
protected function setValue($key, $value, $expiration = 0)
|
||||
{
|
||||
return $this->getMemcached()->set($key, $value, $expiration);
|
||||
return $this->getMemcached()->set($key, $value, false, time() + $expiration);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user