|
@@ 499-509 (lines=11) @@
|
| 496 |
|
* |
| 497 |
|
* @return static This query instance. |
| 498 |
|
*/ |
| 499 |
|
public function setHydrationCacheProfile(QueryCacheProfile $profile = null) |
| 500 |
|
{ |
| 501 |
|
if ($profile !== null && ! $profile->getResultCacheDriver()) { |
| 502 |
|
$resultCacheDriver = $this->_em->getConfiguration()->getHydrationCacheImpl(); |
| 503 |
|
$profile = $profile->setResultCacheDriver($resultCacheDriver); |
| 504 |
|
} |
| 505 |
|
|
| 506 |
|
$this->_hydrationCacheProfile = $profile; |
| 507 |
|
|
| 508 |
|
return $this; |
| 509 |
|
} |
| 510 |
|
|
| 511 |
|
/** |
| 512 |
|
* @return \Doctrine\DBAL\Cache\QueryCacheProfile |
|
@@ 529-539 (lines=11) @@
|
| 526 |
|
* |
| 527 |
|
* @return static This query instance. |
| 528 |
|
*/ |
| 529 |
|
public function setResultCacheProfile(QueryCacheProfile $profile = null) |
| 530 |
|
{ |
| 531 |
|
if ($profile !== null && ! $profile->getResultCacheDriver()) { |
| 532 |
|
$resultCacheDriver = $this->_em->getConfiguration()->getResultCacheImpl(); |
| 533 |
|
$profile = $profile->setResultCacheDriver($resultCacheDriver); |
| 534 |
|
} |
| 535 |
|
|
| 536 |
|
$this->_queryCacheProfile = $profile; |
| 537 |
|
|
| 538 |
|
return $this; |
| 539 |
|
} |
| 540 |
|
|
| 541 |
|
/** |
| 542 |
|
* Defines a cache driver to be used for caching result sets and implicitly enables caching. |