protected function doParse() { $result = null; $hash = $this->getCacheId(); $usedCacheDriver = !$this->query->getExpireQueryCache() ? $this->query->getQueryCacheDriver() : null; if ($usedCacheDriver) { $result = $usedCacheDriver->fetch($hash); } if (!$result instanceof \Doctrine\ORM\Query\ParserResult) { $result = $this->doParseWithoutCache(); if ($usedCacheDriver) { $usedCacheDriver->save($hash, $result, $this->query->getQueryCacheLifetime()); } } return $result; }