According to the [caching docs][1]:

> Anything that is served from the filesystem (a Rack::File) is cached for 12 
> hours.

That's great, but what if we want to use [Rack::StaticCache][2] (via
the rack-contrib project) to cache static assets for more than 12
hours? Does Heroku allow this? I tried serving an image from a simple
Rack app:

    require 'rubygems'
    require 'rack/contrib'
    require 'rack'

    use Rack::StaticCache, :urls => ["/images"], :root => "public"
    run lambda { |env| [200, {'Content-Type' => 'text/html', 'Hello
World!' }

The image had a 'Cache-Control' header value of `public, max-
age=43200`, seemingly ignoring the header values set by
Rack::StaticCache. Is there a way around this?

[1]: http://docs.heroku.com/http-caching
[2]: 
http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/static_cache.rb

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to