mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 00:24:27 +02:00
Add ICacheDriver->getAllKeys method
This commit is contained in:
parent
640f76b05a
commit
71c08a044f
7 changed files with 86 additions and 0 deletions
|
@ -40,6 +40,28 @@ class MemcacheCacheDriver extends AbstractCacheDriver implements IMemoryCacheDri
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (@inheritdoc)
|
||||
*/
|
||||
public function getAllKeys()
|
||||
{
|
||||
$list = [];
|
||||
$allSlabs = $this->memcache->getExtendedStats('slabs');
|
||||
foreach($allSlabs as $slabs) {
|
||||
foreach(array_keys($slabs) as $slabId) {
|
||||
$cachedump = $this->memcache->getExtendedStats('cachedump', (int)$slabId);
|
||||
foreach($cachedump as $keys => $arrVal) {
|
||||
if (!is_array($arrVal)) {
|
||||
continue;
|
||||
}
|
||||
$list = array_merge($list, array_keys($arrVal));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* (@inheritdoc)
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue