Same name in other branches
  1. 7.x-2.x advagg.api.php \hook_advagg_bundler_analysis_alter()

Let other modules modify the analysis array before it is used.

Parameters

array $analysis: An associative array; filename -> data.

See also

advagg_bundler_analysis()

Related topics

File

./advagg.api.php, line 181

Code

function hook_advagg_bundler_analysis_alter(array &$analysis) {
    foreach ($analysis as $filename => &$data) {
        if ($filename) {
            // This is the filename.
        }
        // This changes often; 604800 is 1 week.
        if ($data['changes'] > 10 && $data['mtime'] >= REQUEST_TIME - 604800) {
            // Modify the group hash so this doesn't end up in a big aggregate.
            $data['group_hash'];
        }
    }
    unset($data);
}