Skip to content

Commit 53c7321

Browse files
tom@aligent.com.aunmalevanec
authored andcommitted
Remove forced setting of cache_lifetime to false in constructor and set default cache_lifetime to 3600
1 parent c166940 commit 53c7321

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

app/code/Magento/Theme/Block/Html/Footer.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ protected function _construct()
5757
{
5858
$this->addData(
5959
[
60-
'cache_lifetime' => false,
6160
'cache_tags' => [\Magento\Store\Model\Store::CACHE_TAG, \Magento\Cms\Model\Block::CACHE_TAG],
6261
]
6362
);
@@ -123,4 +122,14 @@ public function getIdentities()
123122
{
124123
return [\Magento\Store\Model\Store::CACHE_TAG, \Magento\Cms\Model\Block::CACHE_TAG];
125124
}
125+
126+
/**
127+
* Get block cache life time
128+
*
129+
* @return int
130+
*/
131+
protected function getCacheLifetime()
132+
{
133+
return parent::getCacheLifetime() ?: 3600;
134+
}
126135
}

0 commit comments

Comments
 (0)