- /**
- * Find Tags and return a Pager.
- *
- * @param int $userId
- *
- * @return Pagerfanta
- */
- public function findTags($userId)
- {
- $qb = $this->getQbForAllTags($userId);
-
- $pagerAdapter = new DoctrineORMAdapter($qb);
+ if (null !== $cacheLifeTime) {
+ $query->useQueryCache(true);
+ $query->useResultCache(true);
+ $query->setResultCacheLifetime($cacheLifeTime);
+ }