6 * @copyright (c) 2005, 2009 phpBB Group
7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
14 if (!defined('IN_PHPBB'))
19 // Include the abstract base
20 if (!class_exists('acm_memory'))
22 require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
29 class acm extends acm_memory
31 var $extension = 'apc';
40 apc_clear_cache('user');
46 * Fetch an item from the cache
49 * @param string $var Cache key
50 * @return mixed Cached data
54 return apc_fetch($this->key_prefix . $var);
58 * Store data in the cache
61 * @param string $var Cache key
62 * @param mixed $data Data to store
63 * @param int $ttl Time-to-live of cached data
64 * @return bool True if the operation succeeded
66 function _write($var, $data, $ttl = 2592000)
68 return apc_store($this->key_prefix . $var, $data, $ttl);
72 * Remove an item from the cache
75 * @param string $var Cache key
76 * @return bool True if the operation succeeded
78 function _delete($var)
80 return apc_delete($this->key_prefix . $var);