diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index 8464a6a55..9ddfbc85c 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php @@ -27,8 +27,7 @@ class TagRepository extends EntityRepository if (null !== $cacheLifeTime) { $query->useQueryCache(true); - $query->useResultCache(true); - $query->setResultCacheLifetime($cacheLifeTime); + $query->enableResultCache($cacheLifeTime); } return \count($query->getArrayResult()); diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php index 47af3c8ec..2c8fbcaca 100644 --- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php @@ -109,8 +109,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface ->getQuery(); $query->useQueryCache(true); - $query->useResultCache(true); - $query->setResultCacheLifetime($this->lifeTime); + $query->enableResultCache($this->lifeTime); return \count($query->getArrayResult()); } @@ -150,8 +149,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface ->getQuery(); $query->useQueryCache(true); - $query->useResultCache(true); - $query->setResultCacheLifetime($this->lifeTime); + $query->enableResultCache($this->lifeTime); $nbArchives = \count($query->getArrayResult());