phpbb/phpBB/includes/acm/acm_apc.php
Chris Smith 6c025db9ec Add APC
Modify Memcache to use the memory abstract


git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9534 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-06-04 14:00:34 +00:00

63 lines
No EOL
804 B
PHP

<?php
/**
*
* @package acm
* @version $Id$
* @copyright (c) 2005, 2009 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Include the abstract base
if (!class_exists('acm_memory'))
{
require("${phpbb_root_path}includes/acm/acm_memory.$phpEx");
}
/**
* ACM for APC
* @package acm
*/
class acm extends acm_memory
{
function acm()
{
// Call the parent constructor
parent::acm_memory();
}
/**
* Purge cache data
*/
function purge()
{
apc_clear_cache('user');
parent::purge();
}
function read($var)
{
return apc_fetch($var);
}
function write($var, $data, $ttl = 2592000)
{
return apc_store($var, $data, $ttl);
}
function delete($var)
{
return apc_delete($var);
}
}
?>