From b95284e198544af7291feea56bc5b8bd8f65fae5 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Wed, 15 Feb 2012 10:50:58 +0100 Subject: [PATCH] [Profiler] Fix memcache(d) --- .../HttpKernel/Profiler/BaseMemcacheProfilerStorage.php | 2 +- .../Component/HttpKernel/Profiler/MemcacheProfilerStorage.php | 2 +- .../Component/HttpKernel/Profiler/MemcachedProfilerStorage.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php index ba4af6e3df..7b015da4c2 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php @@ -29,7 +29,7 @@ abstract class BaseMemcacheProfilerStorage implements ProfilerStorageInterface * @param string $dsn A data source name * @param string $username * @param string $password - * @param int $lifetime The lifetime to use for the purge + * @param int $lifetime The lifetime to use for the purge */ public function __construct($dsn, $username = '', $password = '', $lifetime = 86400) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php index e6e43e27a7..fdf5ff0e59 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php @@ -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); } /** diff --git a/src/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php index f9b4e10b03..b91582ace5 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php @@ -67,7 +67,7 @@ class MemcachedProfilerStorage extends BaseMemcacheProfilerStorage */ protected function setValue($key, $value, $expiration = 0) { - return $this->getMemcached()->set($key, $value, false, $expiration); + return $this->getMemcached()->set($key, $value, false, time() + $expiration); } /**