You are here

function advagg_admin_remove_old_unused_aggregates_button in Advanced CSS/JS Aggregation 7.2

Delete aggregates that have not been accessed in the last 6 weeks.

Related topics

1 string reference to 'advagg_admin_remove_old_unused_aggregates_button'
advagg_admin_operations_form in ./advagg.admin.inc
Form builder; Do advagg operations.

File

./advagg.admin.inc, line 1803
Admin page callbacks for the advanced CSS/JS aggregation module.

Code

function advagg_admin_remove_old_unused_aggregates_button() {
  module_load_include('inc', 'advagg', 'advagg.cache');

  // Remove unused aggregates.
  $count = advagg_remove_old_unused_aggregates();
  if (empty($count)) {
    drupal_set_message(t('No old and unused aggregates found. Nothing was deleted.'));
  }
  else {
    drupal_set_message(t('Some old and unused aggregates were found. A total of %count database entries were removed.', array(
      '%count' => $count,
    )));
  }
}