You are here

function advagg_delete_stale_aggregates in Advanced CSS/JS Aggregation 7.2

Scan CSS/JS advagg dir and remove that file if atime is grater than 30 days.

Return value

array Array of files that got removed.

2 calls to advagg_delete_stale_aggregates()
advagg_admin_flush_stale_files_button in ./advagg.admin.inc
Clear out all stale advagg aggregated files.
advagg_cron in ./advagg.module
Implements hook_cron().

File

./advagg.cache.inc, line 240
Advanced CSS/JS aggregation module.

Code

function advagg_delete_stale_aggregates() {
  list($css_files, $js_files) = advagg_get_all_files();

  // Make the advagg_get_hashes_from_filename() function available.
  module_load_include('inc', 'advagg', 'advagg.missing');
  $css_files = advagg_delete_files_if_stale($css_files);
  $js_files = advagg_delete_files_if_stale($js_files);
  return array(
    $css_files,
    $js_files,
  );
}