function hook_admin_menu_cache_info

nittany7 admin_menu.api.php hook_admin_menu_cache_info()
cis7 admin_menu.api.php hook_admin_menu_cache_info()
mooc7 admin_menu.api.php hook_admin_menu_cache_info()

Inform about additional module-specific caches that can be cleared.

Administration menu uses this hook to gather information about available caches that can be flushed individually. Each returned item forms a separate menu link below the "Flush all caches" link in the icon menu.

Return value

array An associative array whose keys denote internal identifiers for a particular caches (which can be freely defined, but should be in a module's namespace) and whose values are associative arrays containing:

  • title: The name of the cache, without "cache" suffix. This label is output as link text, but also for the "!title cache cleared." confirmation message after flushing the cache; make sure it works and makes sense to users in both locations.
  • callback: The name of a function to invoke to flush the individual cache.
4 functions implement hook_admin_menu_cache_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

admin_menu_admin_menu_cache_info in modules/contrib/admin_menu/
Implements hook_admin_menu_cache_info().
advagg_admin_menu_cache_info in modules/contrib/advagg/advagg.module
Implements hook_admin_menu_cache_info().
system_admin_menu_cache_info in modules/contrib/admin_menu/
Implements hook_admin_menu_cache_info() on behalf of System module.
update_admin_menu_cache_info in modules/contrib/admin_menu/
Implements hook_admin_menu_cache_info() on behalf of Update module.
2 invocations of hook_admin_menu_cache_info()
admin_menu_flush_cache in modules/contrib/admin_menu/
Flush all caches or a specific one.
admin_menu_links_icon in modules/contrib/admin_menu/
Build icon menu links; mostly containing maintenance helpers.


modules/contrib/admin_menu/admin_menu.api.php, line 158
API documentation for Administration menu.


function hook_admin_menu_cache_info() {
  $caches['update'] = array(
    'title' => t('Update data'),
    'callback' => '_update_cache_clear',
  return $caches;