class Restforce::Middleware::Caching

def initialize(app, cache = nil, options = {})

Yields if no cache is given. The block should return a cache object.

(default: CACHEABLE_STATUS_CODE)
:status_codes - Array of http status code to be cache
(url.host + url.request_uri)
:full_key - Boolean - use full URL as cache key:
will be passed.
method. If not specified, no options parameter
third options parameter to the cache's #write
:write_options - Hash of settings that should be passed as the
the cache key (default: []).
params that should be ignored when forming
:ignore_params - String name or Array names of query
options - An options Hash (default: {}):
cache - An object that responds to read and write (default: nil).

Public: initialize the middleware.
def initialize(app, cache = nil, options = {})
  super(app)
  if cache.is_a?(Hash) && block_given?
    options = cache
    cache = nil
  end
  @cache = cache || yield
  @options = options
end