Interface CachingWebClient
public interface CachingWebClient
An asynchronous cache aware HTTP / HTTP/2 client called
CachingWebClient.
This client wraps a WebClient and makes it cache aware by adding features to it:
- Cache-Control header parsing
- Freshness checking
The client honors the following cache headers:
- Cache-Control with the following properties understood:
- public
- private
- no-cache
- no-store
- max-age
- s-maxage
- stale-if-error
- staile-while-revalidate
- must-revalidate
- Expires
- ETag
- Vary
- Author:
- Craig Day
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic WebClientCreate a cache aware web client using the providedWebClient.static WebClientcreate(WebClient webClient, CachingWebClientOptions options) Create a cache aware web client using the providedWebClient.static WebClientcreate(WebClient webClient, CacheStore cacheStore) Create a cache aware web client using the providedWebClient.static WebClientcreate(WebClient webClient, CacheStore cacheStore, CachingWebClientConfig options) Create a cache aware web client using the providedWebClient.static WebClientcreate(WebClient webClient, CacheStore cacheStore, CachingWebClientOptions options) Create a cache aware web client using the providedWebClient.
-
Method Details
-
create
-
create
Create a cache aware web client using the providedWebClient.- Parameters:
webClient- the web client instancecacheStore- the cache adapter- Returns:
- the created web client
-
create
Create a cache aware web client using the providedWebClient.- Parameters:
webClient- the web client instanceoptions- the caching web client options- Returns:
- the created web client
-
create
static WebClient create(WebClient webClient, CacheStore cacheStore, CachingWebClientOptions options) Create a cache aware web client using the providedWebClient.- Parameters:
webClient- the web client instancecacheStore- the cache adapteroptions- the caching web client options- Returns:
- the created web client
-
create
Create a cache aware web client using the providedWebClient.- Parameters:
webClient- the web client instancecacheStore- the cache adapteroptions- the caching web client options- Returns:
- the created web client
-