function menu_cache_clear_all
Same name in other branches
- 7.x includes/menu.inc \menu_cache_clear_all()
Clears all cached menu data.
This should be called any time broad changes might have been made to the router items or menu links.
Deprecated
in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal::cache('menu')->invalidateAll() instead.
See also
https://www.drupal.org/node/2989138
Related topics
1 call to menu_cache_clear_all()
- MenuLegacyTest::testMenuCacheClearAll in core/
tests/ Drupal/ KernelTests/ Core/ Menu/ MenuLegacyTest.php - Tests deprecation of the menu_cache_clear_all() function.
File
-
core/
includes/ menu.inc, line 180
Code
function menu_cache_clear_all() {
@trigger_error("menu_cache_clear_all() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use \\Drupal::cache('menu')->invalidateAll() instead. See https://www.drupal.org/node/2989138", E_USER_DEPRECATED);
\Drupal::cache('menu')->invalidateAll();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.