Class: HttpCache

Implements a cache for storing HTTP responses. This cache complies with the caching policy set when configuring HTTP caching in the HTTP client endpoint.


Creates the HTTP cache.

init (CacheConfig cacheConfig)
  • cacheConfig CacheConfig
  • The configurations for the HTTP cache


  • cache Cache
  • The underlying cache used for storing HTTP responses

  • policy CachingPolicy(default CACHE_CONTROL_AND_VALIDATORS)
  • Gives the user some control over the caching behaviour. By default, this is set to CACHE_CONTROL_AND_VALIDATORS. The default behaviour is to allow caching only when the cache-control header and either the etag or last-modified header are present.

  • isShared boolean(default false)
  • Specifies whether the HTTP caching layer should behave as a public cache or a private cache