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); } /**