@@ -251,5 +251,14 @@ abstract class AbstractRepositoryQuery implements RepositoryQueryInterface | |||
{ | |||
return $this->andWhere('.position < :position')->setParameter('position', $position); | |||
} | |||
public function enableCache($lifetime, $idCache) | |||
{ | |||
return $this->getQueryBuilder()->getQuery() | |||
->useQueryCache(true) | |||
->setQueryCacheLifetime($lifetime) | |||
->enableResultCache($lifetime, $idCache); | |||
} | |||
} | |||