manifest / performance / vip-wp-menu-nav-cache-v2
[VIP] WP Menu Nav Cache (v2)
Function-based `wp_nav_menu()` output caching plugin for WordPress/VIP-style environments.
by VIP · github.com/automattic/vip-wp-menu-nav-cache-v2 · website
★ 0stars
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/automattic/vip-wp-menu-nav-cache-v2/archive/refs/heads/trunk.zipFunction-based wp_nav_menu() output caching plugin for WordPress/VIP-style environments.
Core behavior
- Caches menu HTML via
pre_wp_nav_menu+wp_nav_menuhooks. - Uses generation-based invalidation (
wpvip_nav_menu_generation) in object cache groupwpvip_nav_menu. - Defaults to a 1-hour cache TTL (
HOUR_IN_SECONDS), filterable withwpvip_nav_menu_cache_ttl. - Ships the
wpvip_nav_menu_should_cachefilter and default callback that disables cache for logged-in users and singular pages.
Additional salvage from Automattic/cache-nav-menus
- Adds
parse_queryhook to forcecache_results = truefornav_menu_itemqueries, reducing database pressure on cold paths.
Composer
composer install
Autoload uses autoload.files for src/functions.php.