Excluding pages from menu

Created on 5 January 2021, about 4 years ago
Updated 25 June 2024, 7 months ago

Problem/Motivation

When a menu is on every page, all pages are always purged from the cache (even if they are not in the menu).
It is similar to what was described at https://www.drupal.org/project/purge/issues/2997579 β†’ .
I'm experiencing it on Acquia Cloud, in case it may have relevance.

Steps to reproduce

  1. Have a navigation block on every page.
  2. Create few nodes. Add them to menu.
  3. Create one node. Don't add it to the menu.
  4. Look at `X-Drupal-Cache-Tags` for this standalone node, there will be a list of tags `node:xx` with all nodes that are in the menu.
  5. Change something on this page. Because of the other tags it will invalidate the cache for all the pages in menu, but in turn for all other pages outside menu, which have the menu block on them.
  6. So in reality, the purge will invalidate caches for every page every time, there is a change.

Proposed resolution

Add option to exclude tags for nodes related via menu. But if the same node is present on the page through an entity reference, or a view it should be purgable.

Is something like this possible? Maybe I did not understand the mechanics completely, but from my observation the behaviour is not ideal.

Thanks for any advice.

✨ Feature request
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡ΏCzech Republic Petr Illek

Live updates comments and jobs are added and updated live.
Sign in to follow issues

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