. */ 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: 3938 $ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel * @author David Abdemoulaie */ 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 = false) { return (bool) apc_store($id, $data, $lifeTime); } /** * {@inheritdoc} */ protected function _doDelete($id) { return apc_delete($id); } }