// add query result cache $query = $this->createQueryBuilder('i') ->where('i.delete = false') ->getQuery(); $query->useResultCache(true, 3600, 'allItems'); $items = $query->getArrayResult(); // delete cache $em->getConfiguration() ->getResultCacheImpl()->delete('allItems');
No comments:
Post a Comment