From a9d7a7ad691680216e3318e162ab4da8b5b6d88b Mon Sep 17 00:00:00 2001 From: "tom@aligent.com.au" Date: Wed, 21 Feb 2018 14:05:55 +1030 Subject: [PATCH] Remove forced setting of cache_lifetime to false in constructor and set default cache_lifetime to 3600 --- app/code/Magento/Theme/Block/Html/Footer.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Theme/Block/Html/Footer.php b/app/code/Magento/Theme/Block/Html/Footer.php index 4cd63462ec754..cdb350336f38f 100644 --- a/app/code/Magento/Theme/Block/Html/Footer.php +++ b/app/code/Magento/Theme/Block/Html/Footer.php @@ -57,7 +57,6 @@ protected function _construct() { $this->addData( [ - 'cache_lifetime' => false, 'cache_tags' => [\Magento\Store\Model\Store::CACHE_TAG, \Magento\Cms\Model\Block::CACHE_TAG], ] ); @@ -123,4 +122,14 @@ public function getIdentities() { return [\Magento\Store\Model\Store::CACHE_TAG, \Magento\Cms\Model\Block::CACHE_TAG]; } + + /** + * Get block cache life time + * + * @return int + */ + protected function getCacheLifetime() + { + return parent::getCacheLifetime() ?: 3600; + } }