diff --git a/lib/Doctrine/Query/Abstract.php b/lib/Doctrine/Query/Abstract.php index e4a68126a..2902fc7a5 100644 --- a/lib/Doctrine/Query/Abstract.php +++ b/lib/Doctrine/Query/Abstract.php @@ -891,7 +891,8 @@ public function getComponentAlias($sqlTableAlias) public function calculateQueryCacheHash() { $dql = $this->getDql(); - $hash = md5($dql . var_export($this->_pendingJoinConditions, true) . 'DOCTRINE_QUERY_CACHE_SALT'); + $conn = $this->getConnection(); + $hash = md5($dql . $conn->getOption('dsn') . var_export($this->_pendingJoinConditions, true) . 'DOCTRINE_QUERY_CACHE_SALT'); return $hash; }