Sha256: 0c4ad37d4629dd89af7f61c11becde0d6d866bce8d268ef74775a330fd4c4ba2
Contents?: true
Size: 424 Bytes
Versions: 96
Compression:
Stored size: 424 Bytes
Contents
module Rack module Jasmine class CacheControl def initialize(app) @app, @content_type = app end def call(env) status, headers, body = @app.call(env) headers = Rack::Utils::HeaderHash.new(headers) headers['Cache-Control'] ||= "max-age=0, private, must-revalidate" headers['Pragma'] ||= "no-cache" [status, headers, body] end end end end
Version data entries
96 entries across 81 versions & 4 rubygems