You are here

function devel_cache_clear in Devel 5

Same name and namespace in other branches
  1. 6 devel.module \devel_cache_clear()
  2. 7 devel.pages.inc \devel_cache_clear()

Menu callback; clears all caches, then redirects to the previous page.

1 string reference to 'devel_cache_clear'
devel_menu in ./devel.module
Implementation of hook_menu().

File

./devel.module, line 805

Code

function devel_cache_clear() {

  // clear preprocessor cache
  drupal_clear_css_cache();

  // clear core tables
  $core = array(
    'cache',
    'cache_filter',
    'cache_menu',
    'cache_page',
  );
  $alltables = array_merge($core, module_invoke_all('devel_caches'));
  foreach ($alltables as $table) {
    cache_clear_all('*', $table, TRUE);
  }
  drupal_set_message('Cache cleared.');
  drupal_goto();
}