mirror of
https://github.com/friendica/friendica
synced 2025-04-24 03:50:12 +00:00
friendica-5847 Console Cache List command doesn't work
- filterPrefix => filterArrayKeysByPrefix() - Logging failed Executions of getAllKeys and get from Memcached
This commit is contained in:
parent
3f0f3b6ae6
commit
1ec5c6b284
5 changed files with 26 additions and 28 deletions
|
@ -45,23 +45,23 @@ class MemcacheCacheDriver extends AbstractCacheDriver implements IMemoryCacheDri
|
|||
*/
|
||||
public function getAllKeys($prefix = null)
|
||||
{
|
||||
$list = [];
|
||||
$keys = [];
|
||||
$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) {
|
||||
foreach ($cachedump as $key => $arrVal) {
|
||||
if (!is_array($arrVal)) {
|
||||
continue;
|
||||
}
|
||||
$list = array_merge($list, array_keys($arrVal));
|
||||
$keys = array_merge($keys, array_keys($arrVal));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$list = $this->getOriginalKeys($list);
|
||||
$keys = $this->getOriginalKeys($keys);
|
||||
|
||||
return $this->filterPrefix($list, $prefix);
|
||||
return $this->filterArrayKeysByPrefix($keys, $prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue