function _admin_menu_flush_cache in Administration menu 8.3
Same name and namespace in other branches
- 6.3 admin_menu.inc \_admin_menu_flush_cache()
- 7.3 admin_menu.inc \_admin_menu_flush_cache()
Flush all caches or a specific one.
Parameters
$name: (optional) Name of cache to flush.
See also
system_admin_menu_cache_info()
2 string references to '_admin_menu_flush_cache'
- admin_menu_admin_menu_cache_info in ./
admin_menu.inc - Implements hook_admin_menu_cache_info().
- system_admin_menu_cache_info in ./
admin_menu.inc - Implements hook_admin_menu_cache_info() on behalf of System module.
File
- ./
admin_menu.inc, line 850 - Menu builder functions for Administration menu.
Code
function _admin_menu_flush_cache($name = NULL) {
switch ($name) {
case 'admin_menu':
admin_menu_cache_flush();
break;
case 'menu':
menu_router_rebuild();
break;
case 'bootstrap':
cache('bootstrap')
->deleteAll();
cache('config')
->deleteAll();
break;
case 'cache':
// @see drupal_flush_all_caches()
foreach (module_invoke_all('cache_flush') as $bin) {
cache($bin)
->deleteAll();
}
break;
case 'assets':
// Change query-strings on css/js files to enforce reload for all users.
_drupal_flush_css_js();
drupal_clear_css_cache();
drupal_clear_js_cache();
// Clear the page cache, since cached HTML pages might link to old CSS and
// JS aggregates.
cache('page')
->deleteAll();
break;
case 'theme':
system_rebuild_theme_data();
drupal_theme_rebuild();
break;
}
}