aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm/acm_memcache.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-06-04 14:34:07 +0000
committerChris Smith <toonarmy@phpbb.com>2009-06-04 14:34:07 +0000
commitaec3a498de31b380d0eb48154de0b2bd56054dfa (patch)
tree5c1a11b465a1a018a038bd3914ded3371352646a /phpBB/includes/acm/acm_memcache.php
parent43f19387ffc7c23f1e02bfde131cd804a0249922 (diff)
downloadforums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar.gz
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar.bz2
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar.xz
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.zip
Lets follow some PHP4 conventions underscores for internal methods.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9536 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm/acm_memcache.php')
-rw-r--r--phpBB/includes/acm/acm_memcache.php36
1 files changed, 33 insertions, 3 deletions
diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/includes/acm/acm_memcache.php
index 4950738522..1ec37f1b3b 100644
--- a/phpBB/includes/acm/acm_memcache.php
+++ b/phpBB/includes/acm/acm_memcache.php
@@ -61,6 +61,11 @@ class acm extends acm_memory
$this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0;
}
+ /**
+ * Unload the cache resources
+ *
+ * @return void
+ */
function unload()
{
parent::unload();
@@ -70,6 +75,8 @@ class acm extends acm_memory
/**
* Purge cache data
+ *
+ * @return void
*/
function purge()
{
@@ -78,17 +85,40 @@ class acm extends acm_memory
parent::purge();
}
- function read($var)
+ /**
+ * Fetch an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return mixed Cached data
+ */
+ function _read($var)
{
return $this->memcache->get($var);
}
- function write($var, $data, $ttl = 2592000)
+ /**
+ * Store data in the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @param mixed $data Data to store
+ * @param int $ttl Time-to-live of cached data
+ * @return bool True if the operation succeeded
+ */
+ function _write($var, $data, $ttl = 2592000)
{
return $this->memcache->set($var, $data, $this->flags, $ttl);
}
- function delete($var)
+ /**
+ * Remove an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if the operation succeeded
+ */
+ function _delete($var)
{
return $this->memcache->delete($var);
}