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-2.5.1 lib/rack/jasmine/cache_control.rb
jasmine-2.5.0 lib/rack/jasmine/cache_control.rb
tdiary-5.0.1 vendor/bundle/gems/jasmine-2.4.0/lib/rack/jasmine/cache_control.rb
jasmine-2.4.0 lib/rack/jasmine/cache_control.rb
jasmine-2.3.1 lib/rack/jasmine/cache_control.rb
jasmine-2.3.0 lib/rack/jasmine/cache_control.rb
jasmine-2.2.0 lib/rack/jasmine/cache_control.rb
jasmine-2.1.0 lib/rack/jasmine/cache_control.rb
jasmine-2.0.3 lib/rack/jasmine/cache_control.rb
jasmine-2.0.2 lib/rack/jasmine/cache_control.rb
jasmine-2.0.1 lib/rack/jasmine/cache_control.rb
jasmine-2.0.0 lib/rack/jasmine/cache_control.rb
jasmine-2.0.0.rc5 lib/rack/jasmine/cache_control.rb
jasmine-2.0.0.rc4 lib/rack/jasmine/cache_control.rb
jasmine-2.0.0.rc3 lib/rack/jasmine/cache_control.rb
jasmine-2.0.0.rc2 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.18 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.12 lib/rack/jasmine/cache_control.rb
rally-jasmine-1.2.0.11 lib/rack/jasmine/cache_control.rb
jasmine-multi_json-1.3.2.1 lib/rack/jasmine/cache_control.rb