#170514 by pwolanin: block and page cache should be cleaned when a menu item is changed (saved, deleted) or the menu router is rebuilt

6.x
Gábor Hojtsy 2007-10-05 13:17:09 +00:00
parent 00c8725480
commit 0e04fbd43d
2 changed files with 6 additions and 1 deletions

View File

@ -1415,6 +1415,8 @@ function menu_rebuild() {
menu_cache_clear_all();
$menu = menu_router_build(TRUE);
_menu_navigation_links_rebuild($menu);
// Clear the page and block caches.
cache_clear_all();
}
/**
@ -1556,6 +1558,8 @@ function _menu_delete_item($item, $rebuild = FALSE) {
// If we are rebuilding the menu, the menu cache has already been cleared.
if (!$rebuild) {
menu_cache_clear($item['menu_name']);
// Clear the page and block caches.
cache_clear_all();
}
}
}
@ -1700,6 +1704,8 @@ function menu_link_save(&$item) {
$names[] = $n['menu_name'];
}
variable_set('menu_expanded', $names);
// Clear the page and block caches.
cache_clear_all();
return $item['mlid'];
}

View File

@ -317,7 +317,6 @@ function node_type_form_submit($form, &$form_state) {
}
node_types_rebuild();
cache_clear_all();
menu_rebuild();
$t_args = array('%name' => $type->name);