diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-07-22 02:31:43 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-07-22 02:31:48 +0200 |
commit | 51566e87c7343385ae3b6854386c20974c94a53d (patch) | |
tree | 35b50a0cf64ed280f037902a87504d2af3a92428 /lib/cache/apc.php | |
parent | 2b747789588e34bce24bd558f7e979a6e0ea8047 (diff) | |
download | nextcloud-server-51566e87c7343385ae3b6854386c20974c94a53d.tar.gz nextcloud-server-51566e87c7343385ae3b6854386c20974c94a53d.zip |
add prefix option to OC_Cache::clear
Diffstat (limited to 'lib/cache/apc.php')
-rw-r--r-- | lib/cache/apc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/cache/apc.php b/lib/cache/apc.php index 6cf47d0c158..c192fe2f196 100644 --- a/lib/cache/apc.php +++ b/lib/cache/apc.php @@ -43,14 +43,15 @@ class OC_Cache_APC { return apc_delete($this->getNamespace().$key); } - public function clear(){ - $ns = $this->getNamespace(); + public function clear($prefix=''){ + $ns = $this->getNamespace().$prefix; $cache = apc_cache_info('user'); foreach($cache['cache_list'] as $entry) { if (strpos($entry['info'], $ns) === 0) { apc_delete($entry['info']); } } + return true; } } if(!function_exists('apc_exists')) { |