Deletes all optimized collection assets.
Note: Core's deleteAll() only deletes old files not all.
Fichier
-
src/
Asset/ CssCollectionOptimizer.php, line 241
Classe
Namespace
Drupal\advagg\AssetCode
public function deleteAllReal() {
$log = [];
$this->state
->delete('system.css_cache_files');
Cache::invalidateTags([
'library_info',
]);
$delete_all = function ($uri) use (&$log) {
file_unmanaged_delete($uri);
$log[] = $uri;
};
$this->state
->delete('system.js_cache_files');
file_scan_directory($this->dumper
->preparePath('css'), '/.*/', [
'callback' => $delete_all,
]);
return $log;
}