summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-09-25 11:06:22 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-09-25 11:47:53 +0200
commita8ff1505d658d027168afb5b1b18475bf0d1d9eb (patch)
treed921a68887a12f4656a3619246e46ace4a481053
parente5487376dad48c73a0ba4acb6ed912bccfcd9623 (diff)
downloadnextcloud-server-a8ff1505d658d027168afb5b1b18475bf0d1d9eb.tar.gz
nextcloud-server-a8ff1505d658d027168afb5b1b18475bf0d1d9eb.zip
backwards compat to older xcache versions, don't fail when trying to clear cache by prefix
-rw-r--r--lib/cache/xcache.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cache/xcache.php b/lib/cache/xcache.php
index cecdf46351c..9f380f870b9 100644
--- a/lib/cache/xcache.php
+++ b/lib/cache/xcache.php
@@ -44,6 +44,12 @@ class OC_Cache_XCache {
}
public function clear($prefix='') {
+ if(!function_exists('xcache_unset_by_prefix')) {
+ function xcache_unset_by_prefix($prefix) {
+ // Since we can't clear targetted cache, we'll clear all. :(
+ xcache_clear_cache(XC_TYPE_VAR, 0);
+ }
+ }
xcache_unset_by_prefix($this->getNamespace().$prefix);
return true;
}