diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/memcache/memcached.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/memcache/memcached.php b/lib/private/memcache/memcached.php index 1503851fd73..e99303ecc15 100644 --- a/lib/private/memcache/memcached.php +++ b/lib/private/memcache/memcached.php @@ -89,6 +89,11 @@ class Memcached extends Cache implements IMemcache { public function clear($prefix = '') { $prefix = $this->getNamespace() . $prefix; $allKeys = self::$cache->getAllKeys(); + if ($allKeys === false) { + // newer Memcached doesn't like getAllKeys(), flush everything + self::$cache->flush(); + return true; + } $keys = array(); $prefixLength = strlen($prefix); foreach ($allKeys as $key) { |