File tree Expand file tree Collapse file tree 4 files changed +0
-94
lines changed
Expand file tree Collapse file tree 4 files changed +0
-94
lines changed Original file line number Diff line number Diff line change 1414 */
1515class Topmenu
1616{
17- /**
18- * Cache tag for menu block
19- */
20- private $ cacheTag = "top_menu " ;
21-
2217 /**
2318 * Catalog category
2419 *
@@ -124,7 +119,6 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
124119 $ subject ->addIdentity (Category::CACHE_TAG );
125120 $ rootId = $ this ->storeManager ->getStore ()->getRootCategoryId ();
126121 $ storeId = $ this ->storeManager ->getStore ()->getId ();
127- $ currentCategory = $ this ->getCurrentCategory ();
128122 /** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $collection */
129123 $ collection = $ this ->getCategoryTree ($ storeId , $ rootId );
130124 $ mapping = [$ rootId => $ subject ->getMenu ()]; // use nodes stack to avoid recursion
@@ -134,9 +128,6 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
134128 }
135129 $ subject ->addIdentity (Category::CACHE_TAG . '_ ' . $ category ->getId ());
136130 }
137- if ($ currentCategory ) {
138- $ subject ->addIdentity ($ this ->cacheTag . '_ ' . Category::CACHE_TAG . '_ ' . $ currentCategory ->getId ());
139- }
140131 }
141132
142133 /**
Original file line number Diff line number Diff line change 1313 <element name =" expandAll" type =" button" selector =" .tree-actions a:last-child" />
1414 <element name =" categoryTreeRoot" type =" text" selector =" div.x-tree-root-node>li.x-tree-node:first-of-type>div.x-tree-node-el:first-of-type" timeout =" 30" />
1515 <element name =" categoryInTree" type =" text" selector =" //a/span[contains(text(), '{{name}}')]" parameterized =" true" timeout =" 30" />
16- <element name =" categoryHighlighted" type =" text" selector =" //ul[@id='ui-id-2']//li//a/span[contains(text(),'{{name}}')]/../.." parameterized =" true" timeout =" 30" />
17- <element name =" categoryNotHighlighted" type =" text" selector =" ul[id=\'ui-id-2\'] li[class~=\'active\']" timeout =" 30" />
1816 <element name =" categoryInTreeUnderRoot" type =" text" selector =" //li/ul/li[@class='x-tree-node']/div/a/span[contains(text(), '{{name}}')]" parameterized =" true" />
1917 <element name =" lastCreatedCategory" type =" block" selector =" .x-tree-root-ct li li:last-child" />
2018 <element name =" treeContainer" type =" block" selector =" .tree-holder" />
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -74,16 +74,6 @@ protected function getCacheLifetime()
7474 return parent ::getCacheLifetime () ?: 3600 ;
7575 }
7676
77- /**
78- * Get cache key informative items
79- *
80- * @return array
81- */
82- public function getCacheKeyInfo ()
83- {
84- return array_merge (parent ::getCacheKeyInfo (), $ this ->getIdentities ());
85- }
86-
8777 /**
8878 * Get top menu html
8979 *
You can’t perform that action at this time.
0 commit comments