function javascript_aggregator_clear_cache in Javascript Aggregator 5
Delete all cached JS files.
1 string reference to 'javascript_aggregator_clear_cache'
- javascript_aggregator_menu in ./
javascript_aggregator.module - Implementation of hook_menu().
File
- ./
javascript_aggregator.module, line 140 - Aggregates Javascript files to increase performance.
Code
function javascript_aggregator_clear_cache() {
$success = file_scan_directory(file_create_path('js'), '.*', array(
'.',
'..',
'CVS',
), 'file_delete', FALSE);
if ($success) {
drupal_set_message(t('Javascript cache cleared.'), $type = 'status');
}
else {
drupal_set_message(t('Javascript cache could not be cleared. Or already empty.'), $type = 'error');
}
drupal_goto('admin/settings/performance');
}