sbecker / asset_packager

JavaScript and CSS Asset Compression for Production Rails Apps
http://synthesis.sbecker.net/pages/asset_packager
517 stars 102 forks source link

Create timestamped assets. #6

Open winding-lines opened 14 years ago

winding-lines commented 14 years ago

I really like your tool and it works great with the default rails cache busting approach of adding a timestamp after ?. However when you use with the amazon CDN the ?timestamp part of the URL is not taken into account.

It would be great if the asset packager could help busting the CDN cache without requiring additional steps to the current workflow. One approach would be to:

  1. save the build timestamp into a configuration file, asset_manager_auto.yml
  2. create a file with a timestamped name
  3. in production when generating the link automatically append the timestamp, for example base_1562827.css, base_1562827.js

I can help with the implementation once we reach a consensus on an approach that works...