Changeset 5303
- Timestamp:
- 12/17/08 22:56:14 (7 months ago)
- Location:
- branches
- Files:
-
- 4 modified
-
1.0/lib/Doctrine/Query.php (modified) (1 diff)
-
1.0/lib/Doctrine/Query/Abstract.php (modified) (1 diff)
-
1.1/lib/Doctrine/Query.php (modified) (1 diff)
-
1.1/lib/Doctrine/Query/Abstract.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/lib/Doctrine/Query.php
r5247 r5303 1129 1129 switch (strtolower($this->_conn->getDriverName())) { 1130 1130 case 'mysql': 1131 $this->useQueryCache(false); 1131 1132 // mysql doesn't support LIMIT in subqueries 1132 1133 $list = $this->_conn->execute($subquery, $params)->fetchAll(Doctrine::FETCH_COLUMN); -
branches/1.0/lib/Doctrine/Query/Abstract.php
r5301 r5303 960 960 } else { 961 961 $query = $this->getSqlQuery($params); 962 $serializedQuery = $this->getCachedForm($query); 963 $queryCacheDriver->save($hash, $serializedQuery, $this->getQueryCacheLifeSpan()); 962 // Check again because getSqlQuery() above could have flipped the _queryCache flag 963 // if this query contains the limit sub query algorithm we don't need to cache it 964 if ($this->_queryCache !== false && ($this->_queryCache || $this->_conn->getAttribute(Doctrine::ATTR_QUERY_CACHE))) { 965 $serializedQuery = $this->getCachedForm($query); 966 $queryCacheDriver->save($hash, $serializedQuery, $this->getQueryCacheLifeSpan()); 967 } 964 968 } 965 969 } else { -
branches/1.1/lib/Doctrine/Query.php
r5265 r5303 1210 1210 switch (strtolower($this->_conn->getDriverName())) { 1211 1211 case 'mysql': 1212 $this->useQueryCache(false); 1212 1213 // mysql doesn't support LIMIT in subqueries 1213 1214 $list = $this->_conn->execute($subquery, $this->_execParams)->fetchAll(Doctrine::FETCH_COLUMN); -
branches/1.1/lib/Doctrine/Query/Abstract.php
r5301 r5303 1042 1042 // Generate SQL or pick already processed one 1043 1043 $query = $this->getSqlQuery($params); 1044 1045 // Convert query into a serialized form 1046 $serializedQuery = $this->getCachedForm($query); 1047 1048 // Save cached query 1049 $queryCacheDriver->save($hash, $serializedQuery, $this->getQueryCacheLifeSpan()); 1044 1045 // Check again because getSqlQuery() above could have flipped the _queryCache flag 1046 // if this query contains the limit sub query algorithm we don't need to cache it 1047 if ($this->_queryCache !== false && ($this->_queryCache || $this->_conn->getAttribute(Doctrine::ATTR_QUERY_CACHE))) { 1048 // Convert query into a serialized form 1049 $serializedQuery = $this->getCachedForm($query); 1050 1051 // Save cached query 1052 $queryCacheDriver->save($hash, $serializedQuery, $this->getQueryCacheLifeSpan()); 1053 } 1050 1054 } 1051 1055 } else {