. */ namespace Doctrine\Common\Cache; /** * Xcache cache driver. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision: 3938 $ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ class XcacheCache implements Cache { /** * {@inheritdoc} */ public function fetch($id) { return $this->contains($id) ? xcache_get($id) : false; } /** * {@inheritdoc} */ public function contains($id) { return xcache_isset($id); } /** * {@inheritdoc} */ public function save($id, $data, $lifeTime = false) { return xcache_set($id, $data, $lifeTime); } /** * {@inheritdoc} */ public function delete($id) { return xcache_unset($id); } }