function drush_advagg_cache_scan in Advanced CSS/JS Aggregation 6
Same name and namespace in other branches
- 7 advagg.drush.inc \drush_advagg_cache_scan()
Rescan bundles and rebuild if needed.
1 string reference to 'drush_advagg_cache_scan'
- advagg_drush_cache_clear in ./
advagg.drush.inc - Implement hook_drush_cache_clear.
File
- ./
advagg.drush.inc, line 22 - Drush commands for Advanced CSS/JS Aggregation.
Code
function drush_advagg_cache_scan() {
global $_advagg;
_drupal_flush_css_js();
$cache_tables = advagg_flush_caches();
foreach ($cache_tables as $table) {
cache_clear_all('*', $table, TRUE);
}
if (empty($_advagg['files'])) {
drush_log(dt('Advanced CSS/JS Aggregation cache scanned and no out of date bundles detected.'));
}
else {
if (empty($_advagg['rebuilt'])) {
drush_log(dt("Advanced CSS/JS Aggregation cache scanned and out of date bundles have marked.\nOld Files:\n!files\nMarked Bundles Count: !count", array(
'!files' => implode("\n", $_advagg['files']),
'!count' => count($_advagg['bundles']),
)));
}
else {
drush_log(dt("Advanced CSS/JS Aggregation cache scanned and out of date bundles have been incremented and rebuilt.\nOld Files:\n%files\n%count done.", array(
'%files' => implode("\n", $_advagg['files']),
'%count' => count($_advagg['rebuilt']),
)));
}
}
}