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
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
jasmine-3.99.0 lib/rack/jasmine/cache_control.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
jasmine-3.10.0 lib/rack/jasmine/cache_control.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
jasmine-3.9.2 lib/rack/jasmine/cache_control.rb
jasmine-3.9.1 lib/rack/jasmine/cache_control.rb
jasmine-3.9.0 lib/rack/jasmine/cache_control.rb
jasmine-3.8.1 lib/rack/jasmine/cache_control.rb
jasmine-3.8.0 lib/rack/jasmine/cache_control.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb