backwards compat to older xcache versions, don't fail when trying to clear cache by prefix
This commit is contained in:
parent
e5487376da
commit
a8ff1505d6
1 changed files with 6 additions and 0 deletions
6
lib/cache/xcache.php
vendored
6
lib/cache/xcache.php
vendored
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue