Ver código fonte

AbstractRepositoryQuery : ajout gestion du cache #489

develop
Guillaume Bourgeois 2 anos atrás
pai
commit
e6d34c0959
1 arquivos alterados com 9 adições e 0 exclusões
  1. +9
    -0
      Repository/AbstractRepositoryQuery.php

+ 9
- 0
Repository/AbstractRepositoryQuery.php Ver arquivo

@@ -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);
}

}


Carregando…
Cancelar
Salvar