| 7 system.api.php | hook_flush_caches() |
| 6 core.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.
Return value
An array of cache table names.
See also
Related topics
6 functions implement hook_flush_caches()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- block_flush_caches in modules/
block/ block.module - Implements hook_flush_caches().
- field_flush_caches in modules/
field/ field.module - Implements hook_flush_caches().
- image_flush_caches in modules/
image/ image.module - Implements hook_flush_caches().
- system_flush_caches in modules/
system/ system.module - Implements hook_flush_caches().
- update_flush_caches in modules/
update/ update.module - Implements hook_flush_caches().
3 invocations of hook_flush_caches()
- CacheClearCase::testFlushAllCaches in modules/
simpletest/ tests/ cache.test - Test drupal_flush_all_caches().
- drupal_flush_all_caches in includes/
common.inc - Flushes all cached data on the site.
- system_cron in modules/
system/ system.module - Implements hook_cron().
File
- modules/
system/ system.api.php, line 2558 - Hooks provided by Drupal core and the System module.
Code
function hook_flush_caches() {
return array('cache_example');
}
Comments
---
PermalinkIn Drupal 8, the hook has been renamed hook_cache_flush().