Cache contexts too big with link_item_content.inactive

Created on 17 March 2020, almost 5 years ago
Updated 3 March 2023, almost 2 years ago

Hello,

We are currently on Drupal 8.8 with Domain Access module and we have around 30 domains, each one with its own menu.
We are also using Redis and we faced an issue with a key too big. After investigating, the key contains thousands of entry like

[menu_item_extras_link_item_content_active_trails:main:8231b46f-816d-4269-8939-151c960d8d24]=link_item_content.inactive:[menu_item_extras_link_item_content_active_trails:main:88f511c1-552f-4bfd-bc68-b0547e5226b6]=link_item_content.inactive:[menu_item_extras_link_item_content_active_trails:main:966d7040-201b-457b-ab9f-ca63e0c06c89]=link_item_content.inactive:[menu_item_extras_link_item_content_active_trails:main:96bfb5b6-a312-4b48-983a-7cba01d3af2e]=link_item_content.inactive:

We have one entry for each menu links of each menu (30 menus with 100+ menu links), removing the context "link_item_content.inactive" from the module would fix the issue but I'd like to understand the impact. I don't understand why we need to set this 'inactive' context, can we remove it safely ?

Thanks for your help.

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024