Skip to content

Commit f591017

Browse files
committed
MAGETWO-47770: Category page triggers about 800 DB requests on calls without FPC
1 parent 0a3fbc9 commit f591017

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function __construct(
4949
TreeFactory $treeFactory,
5050
array $data = []
5151
) {
52-
$this->setCacheLifetime(30 * 60);
5352
parent::__construct($context, $data);
5453
$this->_menu = $nodeFactory->create(
5554
[
@@ -60,6 +59,16 @@ public function __construct(
6059
);
6160
}
6261

62+
/**
63+
* Get block cache life time
64+
*
65+
* @return int
66+
*/
67+
protected function getCacheLifetime()
68+
{
69+
return parent::getCacheLifetime() ?: 3600;
70+
}
71+
6372
/**
6473
* Get top menu html
6574
*

0 commit comments

Comments
 (0)