5 * @copyright (c) 2010 phpBB Group
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
13 if (!defined('IN_PHPBB'))
18 // Include the abstract base
19 if (!class_exists('acm_memory'))
21 require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
28 class acm extends acm_memory
30 var $extension = 'wincache';
39 wincache_ucache_clear();
45 * Fetch an item from the cache
48 * @param string $var Cache key
49 * @return mixed Cached data
54 $result = wincache_ucache_get($this->key_prefix . $var, $success);
56 return ($success) ? $result : false;
60 * Store data in the cache
63 * @param string $var Cache key
64 * @param mixed $data Data to store
65 * @param int $ttl Time-to-live of cached data
66 * @return bool True if the operation succeeded
68 function _write($var, $data, $ttl = 2592000)
70 return wincache_ucache_set($this->key_prefix . $var, $data, $ttl);
74 * Remove an item from the cache
77 * @param string $var Cache key
78 * @return bool True if the operation succeeded
80 function _delete($var)
82 return wincache_ucache_delete($this->key_prefix . $var);