function agrcache_flush_caches in Aggregate cache 7
Implements hook_flush_caches().
File
- ./
agrcache.module, line 529 - Provides imagecache style generation of css/js aggregates.
Code
function agrcache_flush_caches() {
// Core invokes hook_flush_caches() on both cron runs and cache clears.
// Clearing the variable every cron run would be very bad, so detect an
// explicit cache clear. The simplest way to do this is to run
// debug_backtrace() and find drupal_flush_all_caches() in there.
// @todo: http://drupal.org/node/1167144
// @todo: Require PHP 5.3.6 so this can use DEBUG_BACKTRACE_IGNORE_ARGS.
$backtrace = debug_backtrace(FALSE);
if (isset($backtrace[3]) && $backtrace[3]['function'] == 'drupal_flush_all_caches') {
_agrcache_clear_file_list();
}
}