Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Menu warm cache

Security covered Under active development 26 sites

This module improves menu performance by pre-calculating anonymous user access for menu links. It stores this information and only rebuilds the menu cache when necessary, preventing performance degradation on large sites. This ensures visitors always see a fast-loading menu, even during site updates.

Drupal access-checks every menu link on the request that renders the menu, and
tags the cached result with every node the menu links to. On a large site those
two facts fight each other: any node save drops the cached menu, and the next
anonymous visitor pays for a full access check of the whole tree.

Menu Warm Cache breaks that coupling. It stores the anonymous access decision
for every link of the menus you choose in a dedicated table, renders those menus
from the table, and invalidates the menu render cache only once the table has
been rebuilt. The rebuild runs off the request path, in a Symfony Messenger
worker, so visitors keep being served the previous menu, fully cached, until the
new one is ready.

What it does

  • Watches a configurable list of menus. Menus you do not list keep Drupal's
    standard behaviour, so you can adopt the module one menu at a time.
  • Marks a menu dirty when a menu link or a linked node changes, and queues the
    rebuild through Symfony Messenger. A burst of edits to the same menu rebuilds it
    once, not once per edit.
  • Only queues a rebuild when something that actually changes the menu changed:
    the link's menu, title, parent, weight, enabled or expanded state, or target, or
    a node's published status. Other edits are ignored. Sites with custom fields can
    subscribe to an event to force or veto a rebuild.
  • Ships a Materialized Menu block that replaces the core menu block. It drops
    the node cache tags and the config:system.menu.NAME tag and carries a single tag
    that the rebuild invalidates.
  • Decorates menu.default_tree_manipulators so the access check reads the
    materialized table first, and falls back to the runtime check (caching the
    result) for anything it has not seen.
  • Provides a Drush command to rebuild dirty menus on demand.

Requirements

  • Drupal 11.2 or newer, PHP 8.3 or newer.
  • Symfony Messenger integration
    (sm)
    , with a transport configured and a worker running.
  • A worker reset subscriber on WorkerMessageReceivedEvent. The Messenger
    worker never tears down between messages, and Drupal's per-request cache tag
    guard silently drops every invalidation after the first one. Without the reset,
    the table is rebuilt, but the menu never refreshes. The README gives a ready-to-paste implementation. The module does not ship it, because it is generic worker
    hygiene that every message handler on the site needs, not only menu
    rebuilds.

Trade-offs

Menu updates are eventually consistent by design. The menu changes for
anonymous visitors when the worker has finished the rebuild, not when the editor
presses save. If that is not acceptable, this module is not the right tool.

The materialized access is computed for the anonymous user. Authenticated
role combinations fall back to the runtime check and are then cached in the same
table.

Menus are configured through configuration only for now; there is no
administration form yet. Patches welcome.

Drupal 11 · not 10 PHP 8.3

Ask your assistant about Menu warm cache

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Sep 2026
Latest release
2 weeks ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.2 Stable 11 PHP 8.3 Oct 15, 2026
1.0.1 Stable 11 PHP 8.3 Sep 16, 2026
1.0.0 Stable 11 PHP 8.3 Sep 16, 2026
1.0.x-dev Dev 11 PHP 8.3 Sep 16, 2026