- Add
reason_phrase
from the HTTP response to the data stored in the cache according to RFC7230 via #134
- Require
Logger
inBaseStrategy
via #131 - Use unique and sorted headers from the Vary header in
ByVary
strategy via #132
- Introduced a new
strategy
option to support different cache storage strategies. - The original strategy moved from
Faraday::HttpCache::Storage
toFaraday::HttpCache::Strategies::ByUrl
. - The new
Faraday::HttpCache::Strategies::ByVary
strategy uses headers fromVary
header to generate cache keys. It also uses the index withVary
headers mapped to the request URL. Faraday::HttpCache::Storage
class deprecated.
- Added support for Ruby 3.0, 3.1.
- Ruby version constraint changed to 2.4.0.
- Support for faraday 1.x
- Ruby version constraint changed to 2.1.0.
- Changed
Faraday::HttpCache#initialize
to use keyword arguments instead of aHash
.
- Reject invalid
Date
response headers instead of letting the exception bubble.
no-cache
responses won't be treated as fresh and will always be revalidated.
- Update the
CACHE_STATUSES
to properly instrument requests with theCache-Control: no-store
header.
- Update the
CACHE_STATUSES
to better instrumentinvalid
anduncacheable
responses.
- Deprecate the default instrumenter name
process_request.http_cache.faraday
in favor ofhttp_cache.faraday
.
- Added support for
:instrumenter_name
option. - 307 responses (
Temporary Redirects
) are now cached. - Do not crash on non RFC 2616 compliant
Expires
headers.
- Instrumentation supported. (by @dasch)
- Illegal headers from
304
responses will be removed before updating the cached responses. (by @dasch)
- Fixed HTTP method matching that failed when using the
Marshal
serializer. (by @toddmazierski)
- Deprecated configuration API removed.
- Better support for the caching mechanisms described in the RFC 7234, including:
- Reworked the data structures that are stored in the underlying store to store responses under the same URL and HTTP method.
- Cached responses are invalidated after a
PUT
/POST
/DELETE
request. - Support for the
Vary
header as a second logic to retrieve a stored response.
- Header values are explicitly part of the cache key for all requests.
- Encoding conversion exceptions will emit a log warning before raising through
the middleware stack. Use
Marshal
instead ofJSON
to serialize such requests. - Compatible with latest ActiveSupport and Faraday versions.