Caching Large Navigation Menus in Drupal
While working on a project for Pega Systems, I had to deal with documentation organized into books, and some of the books had thousands of pages. Each page had a navigation menu listing every page in a large tree structure (nested HTML lists). The tree was collapsed, with just enough branches expanded to show the current page.
That’s a lot of markup: UL and LI and A, oh my! Did I mention thousands of pages?
Generating that markup took a lot of work: database queries, PHP processing, …