[DDC-1766] Rename closure
This commit is contained in:
parent
3047c4b955
commit
306f9e0ca2
@ -670,7 +670,7 @@ abstract class AbstractQuery
|
||||
$this->setParameters($params);
|
||||
}
|
||||
|
||||
$saveCache = function() {};
|
||||
$setCacheEntry = function() {};
|
||||
if ($this->_hydrationCacheProfile !== null) {
|
||||
list($cacheKey, $realCacheKey) = $this->getHydrationCacheId();
|
||||
|
||||
@ -685,7 +685,8 @@ abstract class AbstractQuery
|
||||
if ( ! $result) {
|
||||
$result = array();
|
||||
}
|
||||
$saveCache = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) {
|
||||
|
||||
$setCacheEntry = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) {
|
||||
$result[$realCacheKey] = $data;
|
||||
$cache->save($cacheKey, $result, $qcp->getLifetime());
|
||||
};
|
||||
@ -694,7 +695,7 @@ abstract class AbstractQuery
|
||||
$stmt = $this->_doExecute();
|
||||
|
||||
if (is_numeric($stmt)) {
|
||||
$saveCache($stmt);
|
||||
$setCacheEntry($stmt);
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
@ -702,7 +703,7 @@ abstract class AbstractQuery
|
||||
$stmt, $this->_resultSetMapping, $this->_hints
|
||||
);
|
||||
|
||||
$saveCache($data);
|
||||
$setCacheEntry($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user