aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm/acm_apc.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-06-04 14:00:34 +0000
committerChris Smith <toonarmy@phpbb.com>2009-06-04 14:00:34 +0000
commit6c025db9ec5754c4a66b88ed0e5a7041f15065b3 (patch)
treeaaa9c7c5646290f8ce57c457e32e8982443487b6 /phpBB/includes/acm/acm_apc.php
parent63c830af343b0cdc7a5e03e2bc1b4309a2cf06c9 (diff)
downloadforums-6c025db9ec5754c4a66b88ed0e5a7041f15065b3.tar
forums-6c025db9ec5754c4a66b88ed0e5a7041f15065b3.tar.gz
forums-6c025db9ec5754c4a66b88ed0e5a7041f15065b3.tar.bz2
forums-6c025db9ec5754c4a66b88ed0e5a7041f15065b3.tar.xz
forums-6c025db9ec5754c4a66b88ed0e5a7041f15065b3.zip
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
Diffstat (limited to 'phpBB/includes/acm/acm_apc.php')
-rw-r--r--phpBB/includes/acm/acm_apc.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/phpBB/includes/acm/acm_apc.php b/phpBB/includes/acm/acm_apc.php
new file mode 100644
index 0000000000..409854bc26
--- /dev/null
+++ b/phpBB/includes/acm/acm_apc.php
@@ -0,0 +1,63 @@
+<?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);
+ }
+}
+
+?> \ No newline at end of file