class Adsf::Rack::Caching
Public Class Methods
new(app)
click to toggle source
# File lib/adsf/rack/caching.rb, line 5 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/adsf/rack/caching.rb, line 9 def call(env) status, headers, body = *@app.call(env) new_headers = headers.merge( 'Cache-Control' => 'max-age=0, stale-if-error=0', ) [status, new_headers, body] end