~/talk

Caching Large Navigation Menus in Drupal

Talkat MidCamp 2020 · 2020-03-19..03-21· [web-performance, frontend-architecture]
links:none on file
slides:none on file

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

  1. 0:00Introduction to caching menus
  2. 5:12Why book navigation needs caching
  3. 11:08Internal versus external cache
  4. 13:34Building navigation in Drupal
  5. 21:54Implementing caching in hook node view
  6. 30:01Caching effects in the database
  7. 39:34Default cache contexts explained
  8. 40:53Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.