This project is not covered by Drupal’s security advisory policy.

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, which means Drupal 11.5+ or 12.0 is required:

  • 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.

Do not use this on production 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. It will not make the linked pages accessible or not.

Future iterations will add the ability to customize those assumptions with alternative strategies.

Supporting organizations: 
Implementation

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Project categories: Performance
  • Created by berdir on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases