fix(TreeMCacheManager#remove)

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2024-01-03 16:07:45 +01:00
parent 007c23bc09
commit 9fbb5351b8
1 changed files with 2 additions and 2 deletions

View File

@ -137,8 +137,8 @@ class TreeCacheManager implements IEventListener {
*/
public function remove(string $type, int $id, array $previousFolders = []): void {
$key = $this->getCacheKey($type, $id);
foreach ($this->caches as $type => $cache) {
if (count($previousFolders) !== 0 && $type === self::CATEGORY_CHILDREN_LAYER) {
foreach ($this->caches as $cacheType => $cache) {
if ($cacheType === self::CATEGORY_CHILDREN_LAYER && count($previousFolders) > 1) {
continue;
}
$cache->remove($key);