. */ namespace Doctrine\Common\Cache; /** * APC cache driver. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision$ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel * @author David Abdemoulaie * @todo Rename: APCCache */ class ApcCache extends AbstractCache { /** * {@inheritdoc} */ public function getIds() { $ci = apc_cache_info('user'); $keys = array(); foreach ($ci['cache_list'] as $entry) { $keys[] = $entry['info']; } return $keys; } /** * {@inheritdoc} */ protected function _doFetch($id) { return apc_fetch($id); } /** * {@inheritdoc} */ protected function _doContains($id) { $found = false; apc_fetch($id, $found); return $found; } /** * {@inheritdoc} */ protected function _doSave($id, $data, $lifeTime = 0) { return (bool) apc_store($id, $data, (int) $lifeTime); } /** * {@inheritdoc} */ protected function _doDelete($id) { return apc_delete($id); } }