Skip to content

Commit

Permalink
Query::_getQueryCacheId() directly accesses $this->_parsedTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Mar 24, 2015
1 parent 517cb7e commit 9eb458c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/Doctrine/ORM/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private function _parse()
return $this->_parserResult;
}

$hash = $this->_getQueryCacheId($types);
$hash = $this->_getQueryCacheId();
$cached = $this->_expireQueryCache ? false : $queryCache->fetch($hash);

if ($cached instanceof ParserResult) {
Expand Down Expand Up @@ -693,11 +693,9 @@ public function getLockMode()
/**
* Generate a cache id for the query cache - reusing the Result-Cache-Id generator.
*
* @param array $types The parameter types, indexed by parameter key.
*
* @return string
*/
protected function _getQueryCacheId(array $types)
protected function _getQueryCacheId()
{
ksort($this->_hints);

Expand All @@ -711,7 +709,7 @@ protected function _getQueryCacheId(array $types)
'&platform=' . $platform .
($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '') .
'&firstResult=' . $this->_firstResult . '&maxResult=' . $this->_maxResults .
'&hydrationMode=' . $this->_hydrationMode . '&types=' . serialize($types) . 'DOCTRINE_QUERY_CACHE_SALT'
'&hydrationMode=' . $this->_hydrationMode . '&types=' . serialize($this->_parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT'
);
}

Expand Down

0 comments on commit 9eb458c

Please sign in to comment.