Record: CacheConfig

Provides a set of configurations for controlling the caching behaviour of the endpoint.

Closed record

Fields

  • enabled boolean(default true)
  • Specifies whether HTTP caching is enabled. Caching is enabled by default.

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

  • capacity int(default 8388608)
  • The capacity of the cache

  • evictionFactor float(default 0.2)
  • The fraction of entries to be removed when the cache is full. The value should be between 0 (exclusive) and 1 (inclusive).

  • 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.