Fix APC and Memcached drivers -- fixes #433

Signed-off-by: Colin Viebrock <colin@viebrock.ca>
This commit is contained in:
Colin Viebrock 2012-03-21 14:18:25 -05:00
parent aa27df8bcb
commit 1d5ad48998
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ protected function retrieve($key)
{ {
if (($cache = apc_fetch($this->key.$key)) !== false) if (($cache = apc_fetch($this->key.$key)) !== false)
{ {
return $cache; return unserialize($cache);
} }
} }
@ -60,7 +60,7 @@ protected function retrieve($key)
*/ */
public function put($key, $value, $minutes) public function put($key, $value, $minutes)
{ {
apc_store($this->key.$key, $value, $minutes * 60); apc_store($this->key.$key, serialize($value), $minutes * 60);
} }
/** /**

View File

@ -49,7 +49,7 @@ protected function retrieve($key)
{ {
if (($cache = $this->memcache->get($this->key.$key)) !== false) if (($cache = $this->memcache->get($this->key.$key)) !== false)
{ {
return $cache; return unserialize($cache);
} }
} }
@ -68,7 +68,7 @@ protected function retrieve($key)
*/ */
public function put($key, $value, $minutes) public function put($key, $value, $minutes)
{ {
$this->memcache->set($this->key.$key, $value, 0, $minutes * 60); $this->memcache->set($this->key.$key, serialize($value), 0, $minutes * 60);
} }
/** /**