From aea43e90df96edd4b2629685c834f79d9f5045b3 Mon Sep 17 00:00:00 2001 From: beberlei Date: Tue, 9 Feb 2010 20:02:43 +0000 Subject: [PATCH] [2.0] DDC-297 - Fixed XCache object serialization problem. --- lib/Doctrine/Common/Cache/XcacheCache.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Common/Cache/XcacheCache.php b/lib/Doctrine/Common/Cache/XcacheCache.php index d150d98de..77d05c34b 100644 --- a/lib/Doctrine/Common/Cache/XcacheCache.php +++ b/lib/Doctrine/Common/Cache/XcacheCache.php @@ -32,6 +32,7 @@ namespace Doctrine\Common\Cache; * @author Jonathan Wage * @author Roman Borschel * @author David Abdemoulaie + * @author Benjamin Eberlei */ class XcacheCache extends AbstractCache { @@ -58,7 +59,7 @@ class XcacheCache extends AbstractCache */ protected function _doFetch($id) { - return $this->_doContains($id) ? xcache_get($id) : false; + return $this->_doContains($id) ? unserialize( xcache_get($id) ) : false; } /** @@ -74,7 +75,7 @@ class XcacheCache extends AbstractCache */ protected function _doSave($id, $data, $lifeTime = false) { - return xcache_set($id, $data, $lifeTime); + return xcache_set($id, serialize($data), $lifeTime); } /**