rails/rails — pull request #16465 by schneems (2014-08-11 18:49:55+00:00)
Title: Enable Cache-Control headers on assets by default

When using assets generated by the asset pipeline we can rely on digest filenames to serve them with a Cache-Control header with little to no problem. This PR sets that value by default to 3600 seconds (1 hour). This is the duration that the CDN will serve this file before needing to hit the Rails server (if it is set as an origin server). It is also the duration that the browser will retain the file in cache.

Ideally we want to set this to the maximum value possible `2592000` but this value affects __all__ assets not just digest assets. It is up to the developer to optimize this value beyond the default.