#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
00c8725480
commit
0e04fbd43d
|
@ -1415,6 +1415,8 @@ function menu_rebuild() {
|
||||||
menu_cache_clear_all();
|
menu_cache_clear_all();
|
||||||
$menu = menu_router_build(TRUE);
|
$menu = menu_router_build(TRUE);
|
||||||
_menu_navigation_links_rebuild($menu);
|
_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 we are rebuilding the menu, the menu cache has already been cleared.
|
||||||
if (!$rebuild) {
|
if (!$rebuild) {
|
||||||
menu_cache_clear($item['menu_name']);
|
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'];
|
$names[] = $n['menu_name'];
|
||||||
}
|
}
|
||||||
variable_set('menu_expanded', $names);
|
variable_set('menu_expanded', $names);
|
||||||
|
// Clear the page and block caches.
|
||||||
|
cache_clear_all();
|
||||||
return $item['mlid'];
|
return $item['mlid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -317,7 +317,6 @@ function node_type_form_submit($form, &$form_state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
node_types_rebuild();
|
node_types_rebuild();
|
||||||
cache_clear_all();
|
|
||||||
menu_rebuild();
|
menu_rebuild();
|
||||||
$t_args = array('%name' => $type->name);
|
$t_args = array('%name' => $type->name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue