Commit 0e04fbd4 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#170514 by pwolanin: block and page cache should be cleaned when a menu item...

#170514 by pwolanin: block and page cache should be cleaned when a menu item is changed (saved, deleted) or the menu router is rebuilt
parent 00c87254
......@@ -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'];
}
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment