drupal_build_css_cache

function drupal_build_css_cache

drupal_build_css_cache($css)

Aggregates and optimizes CSS files into a cache file in the files directory.

The file name for the CSS cache file is generated from the hash of the aggregated contents of the files in $css. This forces proxies and browsers to download new CSS when the CSS changes.

The cache file name is retrieved on a page load via a lookup variable that contains an associative array. The array key is the hash of the file names in $css while the value is the cache file name. The cache file is generated in two cases. First, if there is no file name value for the key, which will happen if a new file name has been added to $css or after the lookup variable is emptied to force a rebuild of the cache. Second, the cache file is generated if it is missing on disk. Old cache files are not deleted immediately when the lookup variable is emptied, but are deleted after a set p