Problem/Motivation

Core menu.module implements hook_block_info() and sets blocks 'cache' to be DRUPAL_NO_CACHE. However the callback for the content in the hook_block_view() is doing custom caching.
(the output for each menu block is returned by the menu_tree() function, which is calling the menu_tree_page_data() function and the latter is creating a custom cache key and dealing with the menu tree cache)

Proposed resolution

Should we consider changing all menu blocks to be DRUPAL_CACHE_CUSTOM rather than DRUPAL_NO_CACHE?

As far as I know DRUPAL_NO_CACHE and DRUPAL_CACHE_CUSTOM are functionally the same, but it will make it more clear if we know from the hook_block_info() that there is some caching happening behind the scenes.

CommentFileSizeAuthor
#2 menu-block_caching-2547995-1.patch520 bytesextremal
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

extremal created an issue. See original summary.

extremal’s picture

extremal’s picture

Status: Active » Needs review
cilefen’s picture

Category: Bug report » Task
Issue tags: -menu