Skip to content

Commit

Permalink
ENGCOM-2647: [Forwardport] Fix false cache_lifetime usage in xml layo…
Browse files Browse the repository at this point in the history
…uts #17350
  • Loading branch information
Stanislav Idolov authored Aug 10, 2018
2 parents acd9947 + 1736b9d commit bb9a652
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ protected function getCacheLifetime()

$cacheLifetime = $this->getData('cache_lifetime');
if (false === $cacheLifetime || null === $cacheLifetime) {
return $cacheLifetime;
return null;
}

return (int)$cacheLifetime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ public function getCacheLifetimeDataProvider()
'dataFromCache' => 'dataFromCache',
'dataForSaveCache' => '',
'expectsDispatchEvent' => $this->exactly(2),
'expectsCacheLoad' => $this->once(),
'expectsCacheLoad' => $this->never(),
'expectsCacheSave' => $this->never(),
'expectedResult' => 'dataFromCache',
'expectedResult' => '',
],
[
'cacheLifetime' => 120,
Expand Down

0 comments on commit bb9a652

Please sign in to comment.