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

File

src/Form/OperationsForm.php, line 421

Class

OperationsForm
Configure advagg settings for this site.

Namespace

Drupal\advagg\Form

Code

public function clearOldUnusedAggregates() {
    // Remove unused aggregates.
    $count = count($this->cssCollectionOptimizer
        ->deleteOld());
    $count += count($this->jsCollectionOptimizer
        ->deleteOld());
    if (empty($count)) {
        drupal_set_message($this->t('No old and unused aggregates found. Nothing was deleted.'));
    }
    else {
        drupal_set_message($this->t('Some old and unused aggregates were found. A total of %count database entries were removed.', [
            '%count' => $count,
        ]));
    }
}