Module: HTTPX::Plugins::ResponseCache::OptionsMethods

Defined in:
lib/httpx/plugins/response_cache.rb

Overview

adds support for the following options:

:supported_vary_headers

array of header values that will be considered for a “vary” header based cache validation (defaults to SUPPORTED_VARY_HEADERS).

:response_cache_store

object where cached responses are fetch from or stored in; defaults to :store (in-memory cache), can be set to :file_store (file system cache store) as well, or any object which abides by the Cache Store Interface

The Cache Store Interface requires implementation of the following methods:

  • #get(request) -> response or nil

  • #set(request, response) -> void

  • #clear() -> void)