Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Usage Milestone: Time Field for Drupal 8+ Module time_field crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This project optimizes menu block caching for anonymous users by reducing the number of cache tags used. It does this by assuming anonymous users can access all published content and handles only node links. Users should test this module thoroughly before production use, as it relies on several core assumptions.

By default, menu blocks contain cache tags for each node that the menu links to, so that the menu can be invalidated if access to the node changes. This can result in a lot of cache tags for large menus and frequently invalidate large parts of a site if any of those nodes is saved.

Warning: This module is a proof of concept and attempts to optimize this by making several assumptions, it also depends on the following core issue #3485030: Avoid saving menu links through node form when they do not change:

  • Caching is only optimized for anonymous users
  • It is assumed that anonymous users can access all published content and can not access unpublished content
  • Only node links and cache tags are supported and invalidated
  • It does not only support menu_link_content links as it uses the menu tree storage API, but will only find routed node links.
  • Menu link content entities are not saved when there is no real change to them, specifically this might currently not work with the token module or other modules that extend how menu_ui interacts with nodes

Do not use this on production yet without extensive testing. If any of those assumptions are not true for your site, menu links will either remain visible when they are inaccessible or not become visible when they should.

Future iterations will add the ability to customize those assumptions with alternative strategies. This will likely only happen once the depending core issue is fixed.

Additional Requirements

A patch for ##3485030: Avoid saving menu links through node form when they do not change

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.x-dev Dev 9–11 Jan 10, 2025