. */ namespace Doctrine\Common\Cache; /** * Xcache cache driver. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 1.0 * @version $Revision: $ * @author Dmitry Bakaleinik (dima@snaiper.net) */ 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); } }