Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Calling variable_set() on an regular page is bad, since it forces a cache clear.
__menu_block_set_menu_trail() does so to "Muck with the static cache of menu_link_get_preferred."
I believe this is only for the life of the page request, so we can alter it temporarily.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1050040-menu-block.patch | 1.09 KB | agentrickard |
Comments
Comment #1
agentrickardAnd a patch.
Comment #2
JohnAlbinAll I can say is: DOH!
I was focusing so much on manipulating the cache, I forgot that variable_set() hits the database. And totally didn't realize it kills all the cache too! blargh. :-p
Fixed. http://drupal.org/cvs?commit=494304