Commit aea43e90 authored by beberlei's avatar beberlei

[2.0] DDC-297 - Fixed XCache object serialization problem.

parent 54010a55
......@@ -32,6 +32,7 @@ namespace Doctrine\Common\Cache;
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author David Abdemoulaie <dave@hobodave.com>
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/
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);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment