title: Heroku production setting Cache-Control differently from local production
body: <p>I have an app running on heroku at <a href="http://chesseng.herokuapp.com/" rel="nofollow">http://chesseng.herokuapp.com/</a> when I visit the page with chrome and its caching disabled I get a response header for application-fingerprint.css that is something like</p>
  
  <pre><code>Cache-Control:private
  Connection:keep-alive
  Content-Encoding:gzip
  Content-Type:text/css
  Date:Wed, 17 Oct 2012 00:17:19 GMT
  Last-Modified:Tue, 16 Oct 2012 03:13:38 GMT
  Status:200 OK
  transfer-encoding:chunked
  Vary:Accept-Encoding
  X-Rack-Cache:miss
  </code></pre>
  
  <p>However if I start up a local instance with <code>rails s -e production</code> and visit it the response header for application-fingerprint.css is something like</p>
  
  <pre><code>Age:5119
  Cache-Control:public, max-age=31536000
  Connection:Keep-Alive
  Content-Encoding:gzip
  Content-Length:95828
  Content-Type:application/javascript
  Date:Tue, 16 Oct 2012 23:01:27 GMT
  Etag:"0bf9e9837d421c2e28be1ef4f0794a48"
  Last-Modified:Tue, 16 Oct 2012 01:07:17 GMT
  Server:WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
  Vary:Accept-Encoding
  X-Content-Digest:add442e2036c1e6e9f4860dcc44496582a5c91b1
  X-Rack-Cache:fresh
  X-Request-Id:b89de17e397ac7b60acfe500e8d15df9
  X-Runtime:0.001632
  X-Ua-Compatible:IE=Edge,chrome=1
  </code></pre>
  
  <p>Why are the caching related fields like Cache-Control, Etag so different compared to heroku? Presumably I want heroku to return Cache-Control:public, max-age=31536000. But I need to first understand why <code>Cache-Control:public, max-age=31536000</code> is being set in my local production mode. Its puzzling because if I set <code>config.static_cache_control = "public, max-age=3600"</code> in <code>config/environments/production.rb</code> and start up a local server in production it still gives back <code>max-age=31536000</code> and seems to ignore <code>max-age=3600</code></p>