Normally it's expected that static assets are handled by the front end
webserver, such as nginx, which generally make it quite easy to set
whatever expiry header you want. They'll also serve the file a lot
faster than merb will, and without tying up the ruby process. If you
really want to do the serving in merb (or, well, ruby) you could look
into rack middlewares, such as Rack::StaticCache[1] which is included
in the rack-contrib gem. By adding that, or something like it, to
your config/rack.rb to replace the existing static file server, it
should add appropriate cache control headers
Regards
Jon
[1]: http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/static_cache.rb
On 1 October 2010 09:24, George Adamson