Caching Large Navigation Menus in Drupal
summary
Project uses Drupal 8 render caching to shrink navigation build time for a book with 4,472 pages whose raw menu HTML is 2.7 megabytes. Strategy: generate one shared UL/LI tree per book, cache it with explicit cache keys/contexts/tags and max-age permanent, and restore per-page active trail with 6 lines of jQuery plus a Twig template and a render array. Result cuts page render from ~40–50s down to ~2–3s locally.
AI-written summary · about
chapters (8)
- 0:00Introduction to caching menus
- 5:12Why book navigation needs caching
- 11:08Internal versus external cache
- 13:34Building navigation in Drupal
- 21:54Implementing caching in hook node view
- 30:01Caching effects in the database
- 39:34Default cache contexts explained
- 40:53Conclusion and Q&A
related talks
03mBoost Navigation Speed with Nuxt's Data Caching
34mCaching in Drupal 8 has evolved: Tips on how to improve your code
43mI really have to do this mega-menu, I have no choice...
37mData-Driven Frontend Components and the New Jira Navigation
41mCaching Like a Pro: Best strategies for dealing with Drupal cache
30mComposition, Caching, and Architecture in modern
24mCache for Commerce Performance and Optimization for High Volume Sales
53mThe Unbearable Weight of Massive JavaScript
