diff --git a/app/code/Magento/Theme/Block/Html/Topmenu.php b/app/code/Magento/Theme/Block/Html/Topmenu.php index 8b86ee29a86d29e78786291c29dcc2ba733ec3d3..0a7c43c26692d107768f5853abec099401dbcc4f 100644 --- a/app/code/Magento/Theme/Block/Html/Topmenu.php +++ b/app/code/Magento/Theme/Block/Html/Topmenu.php @@ -49,7 +49,6 @@ class Topmenu extends Template implements IdentityInterface TreeFactory $treeFactory, array $data = [] ) { - $this->setCacheLifetime(30 * 60); parent::__construct($context, $data); $this->_menu = $nodeFactory->create( [ @@ -60,6 +59,16 @@ class Topmenu extends Template implements IdentityInterface ); } + /** + * Get block cache life time + * + * @return int + */ + protected function getCacheLifetime() + { + return parent::getCacheLifetime() ?: 3600; + } + /** * Get top menu html *