I agree with Steve, 1) Static assets served from public are cached for 12 hours. ( http://docs.heroku.com/http-caching under Static Assets)
2) Setting up your own Rack::Static has a bug in it that is not setting the cache headers, and it is not possible to override. I thought the Heroku team was either fixing it or had fixed it recently. --Keenan On Sep 22, 2010, at 7:09 AM, Steve Smith wrote: > Does Heroku not apply these headers for you? Looking at my site I see > Cache-Control:public, max-age=43200 added to any images served from public? > > I was surprised to learn that ActionDispatch::Static/Rails doesn't cache the > static files in production but I guess it does make sense. You could always > add a caching middleware if you really need to? You can also pass > Cache-Control headers into Rack::Static too but I'm not sure how you would > tell Rails to do that? > > Steve > > On 22 Sep 2010, at 11:39, Alex wrote: > >> Sorry, I should have specified, >> >> the files stored in /public on rails for instance. These aren't >> managed by a controller (so no headers that way) and I was wondering >> if heroku had a default approach to them. >> >> It occurs to me that this may be entirely a Rack issue, though >> hopefully somebody here can point me in the right direction. >> >> >> >> On Sep 22, 4:01 am, Jeff Deville <[email protected]> wrote: >>> This what you're looking for?http://docs.heroku.com/http-caching >>> >>> >>> >>> On Tue, Sep 21, 2010 at 10:36 PM, Alex <[email protected]> wrote: >>>> I'm wondering about the options for caching of public files, I would >>>> image they are cached by default? >>> >>>> How do you set caching headers on them for instance? >>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Heroku" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]<heroku%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/heroku?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Heroku" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/heroku?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
