What triggers the aggregated/compressed CSS/JS file names to be regenerated?
Because of the default header for
.js set in Drupal's stock
.htaccess is 2 weeks, this causes issues with Varnish which obviously just obeys the headers it receives from the application.
.css/.js for 2 weeks isn't really necessary, our web servers can serve hundreds of requests for static files per second. It's the Drupal requests that always worry me. So I can change the
.htaccess (though I actually override the
Cache-control: max-age header in Varnish so we don't have to modify stock files provided by Drupal).
I have noticed that regeneration can sometimes can be triggered with a
drush cc css-js but possibly only if the aggregated files are over a certain age.
Does anyone know what the logic is behind this?
Rather than overriding the header sent by Drupal, it would be useful to know when the file names are regenerated, because that's obviously a way of making sure that HTML code cached in Varnish is picking up a new set of CSS/JS files.