Logging Cache Rebuilds for Drupal

Viewed 75

I would like to know when Drupal clears the cache (or rebuilds it in more recent versions of Drupal). Does anyone know how I can get Drupal to record an entry in a log, whenever it clears the cache? At the risk of sounding like a complete idiot, does Drupal use Drush to rebuild the cache when it does it by itself (on schedule)? Or, is Drush just for the dumb human to use?

1 Answers

As a first step, try using hook_cache_flush or hook_rebuild in a custom module and check the results.

As far as I know any rebuild/cache clear will go through these hooks.

Related