. */ namespace Doctrine\Common\Cache; /** * Zend Data Cache cache driver. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @author Ralph Schindler */ class ZendDataCache extends AbstractCache { public function __construct() { $this->setNamespace('doctrine::'); // zend data cache format for namespaces ends in :: } /** * {@inheritdoc} */ public function getIds() { throw new \BadMethodCallException("getIds() is not supported by ZendDataCache"); } /** * {@inheritdoc} */ protected function _doFetch($id) { return zend_shm_cache_fetch($id); } /** * {@inheritdoc} */ protected function _doContains($id) { return (zend_shm_cache_fetch($id) !== FALSE); } /** * {@inheritdoc} */ protected function _doSave($id, $data, $lifeTime = 0) { return zend_shm_cache_store($id, $data, $lifeTime); } /** * {@inheritdoc} */ protected function _doDelete($id) { return zend_shm_cache_delete($id); } }