X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FCache%2FAPCcache.php;h=0a10a48b6dd5b1a7740095de7898e46838add7d4;hb=d5b9585b3da73a76dada27cfa2f791c6c4763cd5;hp=9ac77b3b48d3aaac50d7397e2cf270d05a6af392;hpb=92b0f883315c72514e629b1c9e37261b84186785;p=civicrm-core.git diff --git a/CRM/Utils/Cache/APCcache.php b/CRM/Utils/Cache/APCcache.php index 9ac77b3b48..0a10a48b6d 100644 --- a/CRM/Utils/Cache/APCcache.php +++ b/CRM/Utils/Cache/APCcache.php @@ -1,7 +1,7 @@ _timeout = intval($config['timeout']); } @@ -76,7 +77,7 @@ class CRM_Utils_Cache_APCcache { * * @return bool */ - function set($key, &$value) { + public function set($key, &$value) { if (!apc_store($this->_prefix . $key, $value, $this->_timeout)) { return FALSE; } @@ -88,7 +89,7 @@ class CRM_Utils_Cache_APCcache { * * @return mixed */ - function &get($key) { + public function &get($key) { return apc_fetch($this->_prefix . $key); } @@ -97,11 +98,11 @@ class CRM_Utils_Cache_APCcache { * * @return bool|string[] */ - function delete($key) { + public function delete($key) { return apc_delete($this->_prefix . $key); } - function flush() { + public function flush() { $allinfo = apc_cache_info('user'); $keys = $allinfo['cache_list']; $prefix = $this->_prefix . "CRM_"; // Our keys follows this pattern: ([A-Za-z0-9_]+)?CRM_[A-Za-z0-9_]+ @@ -109,9 +110,11 @@ class CRM_Utils_Cache_APCcache { foreach ($keys as $key) { $name = $key['info']; - if ($prefix == substr($name,0,$lp)) { // Ours? + if ($prefix == substr($name, 0, $lp)) { + // Ours? apc_delete($this->_prefix . $name); } } } + }