Sha256: 87e84c933ea217006cfa4e0fed30821e88e9fede7cdb8dd8769d1ca838cfa65b

Contents?: true

Size: 1.59 KB

Versions: 136

Compression:

Stored size: 1.59 KB

Contents

require 'rack'

# = HTTP Caching For Rack
#
# Rack::Cache is suitable as a quick, drop-in component to enable HTTP caching
# for Rack-enabled applications that produce freshness (+Expires+, +Cache-Control+)
# and/or validation (+Last-Modified+, +ETag+) information.
#
# * Standards-based (RFC 2616 compliance)
# * Freshness/expiration based caching and validation
# * Supports HTTP Vary
# * Portable: 100% Ruby / works with any Rack-enabled framework
# * Disk, memcached, and heap memory storage backends
#
# === Usage
#
# Create with default options:
#   require 'rack/cache'
#   Rack::Cache.new(app, :verbose => true, :entitystore => 'file:cache')
#
# Within a rackup file (or with Rack::Builder):
#   require 'rack/cache'
#   use Rack::Cache do
#     set :verbose, true
#     set :metastore, 'memcached://localhost:11211/meta'
#     set :entitystore, 'file:/var/cache/rack'
#   end
#   run app
module Rack::Cache
  autoload :Request,      'rack/cache/request'
  autoload :Response,     'rack/cache/response'
  autoload :Context,      'rack/cache/context'
  autoload :Storage,      'rack/cache/storage'
  autoload :CacheControl, 'rack/cache/cachecontrol'

  # Create a new Rack::Cache middleware component that fetches resources from
  # the specified backend application. The +options+ Hash can be used to
  # specify default configuration values (see attributes defined in
  # Rack::Cache::Options for possible key/values). When a block is given, it
  # is executed within the context of the newly create Rack::Cache::Context
  # object.
  def self.new(backend, options={}, &b)
    Context.new(backend, options, &b)
  end
end

Version data entries

136 entries across 112 versions & 23 rubygems

Version Path
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache.rb
challah-1.0.0.beta3 vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
challah-1.0.0.beta2 vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
challah-1.0.0.beta vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
fc-webicons-0.0.2 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
fc-webicons-0.0.1 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
active_mailer-0.0.5 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
active_mailer-0.0.4 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
active_mailer-0.0.3 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache.rb
graphael-on-rails-0.5.1 vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
graphael-on-rails-0.0.1 vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
challah-0.9.1.beta.3 vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
devise_sociable-0.1.0 vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
backbone-queryparams-rails-0.0.1 vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb
railscast-assets-0.0.2 vendor/bundle/gems/backbone-forms-on-rails-0.10.0/vendor/bundle/gems/rack-cache-1.2/lib/rack/cache.rb