Community Documentation

hook_flush_caches

6 core.php hook_flush_caches()
7 system.api.php hook_flush_caches()
8 system.api.php hook_flush_caches()

Add a list of cache tables to be cleared.

This hook allows your module to add cache table names to the list of cache tables that will be cleared by the Clear button on the Performance page or whenever drupal_flush_all_caches is invoked.

Parameters

None.:

Return value

An array of cache table names.

See also

drupal_flush_all_caches()

system_clear_cache_submit()

Related topics

File

developer/hooks/core.php, line 2652
These are the hooks that are invoked by the Drupal core.

Code

<?php
function hook_flush_caches() {
  return array('cache_example');
}
?>

Comments

Note

This hook is also invoked on every cron run by system_cron(), so it may be called a lot more often than you'd think.

Login or register to post comments