Is there any reason why Mage_Page_Block_Html_Topmenu block has its cache lifetime set to 0 (also holepunched in EE) ?
Adding a "active" class for "base/default" theme menu items is definitely not one as it has to be done on the theme level.
Is there any reason why Mage_Page_Block_Html_Topmenu block has its cache lifetime set to 0 (also holepunched in EE) ?
Adding a "active" class for "base/default" theme menu items is definitely not one as it has to be done on the theme level.
I could quote what Ivan Chepurnyi says in here (slide 29) and say "they moved the menu to another blockbut forgot to add caching to it".
Or I could express my opinion.
The menu is just a placeholder now, and it could be modified by observers and look different from page to page.
To cache it, you will need to know the selected menu item that might not be a category. In the current implementation, you still have to go through the menu tree to see what node is selected.
If you know you will only have categories in that menu you can add the caching and a javascript solution for marking the selected menu. See solution in next slides of Ivan's slideshow.
I'm sure there is a way to extend and make it general, not just category dependent.
false. This means it is always cached. The problem is that the block is not used for the navigation starting ce-1.7.Mage_Page_Block_Html_Topmenuis used instead. That one is not cached. – Marius Jul 25 '14 at 14:31app/code/core/Enterprise/PageCache/etc/cache.xmlit resides in<catalog_navigation>node (why?). Updated. – Tim Bezhashvyly Jul 25 '14 at 14:54