| Class | FaradayMiddleware::Caching |
| In: |
lib/faraday_middleware/response/caching.rb
|
| Parent: | Faraday::Middleware |
Public: Caches GET responses and pulls subsequent ones from the cache.
| CACHEABLE_STATUS_CODES | = | [200, 203, 300, 301, 302, 404, 410] |
Internal: List of status codes that can be cached:
|
| cache | [R] |
Public: initialize the middleware.
cache - An object that responds to read and write (default: nil). options - An options Hash (default: {}):
:ignore_params - String name or Array names of query params
that should be ignored when forming the cache
key (default: []).
:write_options - Hash of settings that should be passed as the third
options parameter to the cache's #write method. If not
specified, no options parameter will be passed.
Yields if no cache is given. The block should return a cache object.