You are here

function menu_cache_clear in Drupal 6

Same name and namespace in other branches
  1. 7 includes/menu.inc \menu_cache_clear()

Clears the cached cached data for a single named menu.

Related topics

3 calls to menu_cache_clear()
menu_link_maintain in includes/menu.inc
Insert, update or delete an uncustomized menu link related to a module.
menu_link_save in includes/menu.inc
Save a menu link.
_menu_delete_item in includes/menu.inc
Helper function for menu_link_delete; deletes a single menu link.

File

includes/menu.inc, line 1664
API for the Drupal menu system.

Code

function menu_cache_clear($menu_name = 'navigation') {
  static $cache_cleared = array();
  if (empty($cache_cleared[$menu_name])) {
    cache_clear_all('links:' . $menu_name . ':', 'cache_menu', TRUE);
    $cache_cleared[$menu_name] = 1;
  }
  elseif ($cache_cleared[$menu_name] == 1) {
    register_shutdown_function('cache_clear_all', 'links:' . $menu_name . ':', 'cache_menu', TRUE);
    $cache_cleared[$menu_name] = 2;
  }
}