aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 24d1a57a..302e5a53 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -10,8 +10,6 @@ use Wallabag\CoreBundle\Entity\Tag;
10 10
11class EntryRepository extends EntityRepository 11class EntryRepository extends EntityRepository
12{ 12{
13 private $lifeTime;
14
15 /** 13 /**
16 * Return a query builder to used by other getBuilderFor* method. 14 * Return a query builder to used by other getBuilderFor* method.
17 * 15 *
@@ -311,25 +309,4 @@ class EntryRepository extends EntityRepository
311 309
312 return $qb->getQuery()->getSingleScalarResult(); 310 return $qb->getQuery()->getSingleScalarResult();
313 } 311 }
314
315 public function setLifeTime($lifeTime)
316 {
317 $this->lifeTime = $lifeTime;
318 }
319
320 /**
321 * Enable cache for a query.
322 *
323 * @param Query $query
324 *
325 * @return Query
326 */
327 public function enableCache(Query $query)
328 {
329 $query->useQueryCache(true);
330 $query->useResultCache(true);
331 $query->setResultCacheLifetime($this->lifeTime);
332
333 return $query;
334 }
335} 312}