Skip to content

Commit 86b6f97

Browse files
committed
Clear correct query cache
With new EntityManager creation system we need to clear the new cache system too
1 parent 0a98237 commit 86b6f97

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/ORM/Query/Filter/AclFilter.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Ecodev\Felix\ORM\Query\Filter;
66

7-
use Doctrine\Common\Cache\ClearableCache;
87
use Doctrine\ORM\Mapping\ClassMetadata;
98
use Doctrine\ORM\Query\Filter\SQLFilter;
109
use Ecodev\Felix\Model\User;
@@ -105,10 +104,7 @@ public function setUser(?User $user): void
105104
$this->user = $user;
106105
$this->resetCache();
107106

108-
$cache = _em()->getConfiguration()->getQueryCacheImpl();
109-
if ($cache instanceof ClearableCache) {
110-
$cache->deleteAll();
111-
}
107+
_em()->getConfiguration()->getQueryCache()?->clear();
112108
}
113109

114110
private function resetCache(): void

0 commit comments

Comments
 (0)