diff --git a/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php b/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php index 9e14af5652c4..0c69773c4729 100644 --- a/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php +++ b/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Acl\Domain; use Doctrine\Common\Cache\Cache; +use Doctrine\Common\Cache\CacheProvider; use Symfony\Component\Security\Acl\Model\AclCacheInterface; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; @@ -55,7 +56,9 @@ public function __construct(Cache $cache, PermissionGrantingStrategyInterface $p */ public function clearCache() { - $this->cache->deleteByPrefix($this->prefix); + if ($this->cache instanceof CacheProvider) { + $this->cache->deleteAll(); + } } /**