heroku/heroku-buildpack-ruby — pull request #42 by ndbroadbent (2012-10-28 03:42:27+00:00)
Title: Cache public/assets, and retain old assets until a given expiry time

From [cgriego's comment on a capistrano issue](https://github.com/capistrano/capistrano/issues/210#issuecomment-6064482):

> The assets recipe implements the deployment guidelines that came from the Rails guides and DHH's RailsConf keynote on the pipeline. The shared assets across deploys guideline, I think, came exclusively from the keynote. Sharing assets allows seamless continuous deploys that the user will not have to know went out in the middle of them using the site.

Old assets need to be retained after deploys, because a user might still be fetching a page that relies on the older versions of assets. Since asset URLs have a unique fingerprint hash, this would result in a 404 error, and broken websites.

This pull request also provides support for my [turbo-sprockets-rails3](https://github.com/ndbroadbent/turbo-sprockets-rails3) gem, which speeds up asset compilation by only recompiling changed assets.