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

Version Path
jasmine-1.3.2 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.10 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.8 lib/rack/jasmine/cache_control.rb
jasmine-multi_json-1.3.1.1 lib/rack/jasmine/cache_control.rb
jasmine-1.3.1 lib/rack/jasmine/cache_control.rb
jasmine-1.3.0 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.7 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.6 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.5 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.4 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.3 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.2 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.1 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0 lib/rack/jasmine/cache_control.rb
jasmine-1.2.1 lib/rack/jasmine/cache_control.rb
jasmine-1.2.0 lib/rack/jasmine/cache_control.rb