- Issue created by @janvonmulert
- Assigned to roxflame
- ๐ณ๐ฟNew Zealand roxflame
I found a similar issue with another module:
https://www.drupal.org/project/responsive_menu/issues/3212699 โ
public function getCacheContexts() { $menu_name = $this->getDerivativeId(); return Cache::mergeContexts(parent::getCacheContexts(), ['route.menu_active_trails:' . $menu_name]);
"This effectively caches a unique entry for the menu per every menu link, which to some extent defeats the purpose of caching."
With that in mind, I've rolled a patch here that uses just the menu name as the context, and ignores the menu active trails. This appears to be fine if active-menu-trails are not used in the theme for anything.
- Status changed to Needs review
6 months ago 9:01am 21 May 2024 - ๐ณ๐ฟNew Zealand roxflame
Trying again, accidentally generated patch 02 from the already patched state...
- ๐ณ๐ฟNew Zealand roxflame
Note to say that we ended up resolving our performance issues, with a combination of things, primarily ensuring that all nested views with contextual filters could be cached using this: https://www.drupal.org/project/drupal/issues/3092715 ๐ Views relying on contextual filter defaults always get the url cache context Active