Record: CacheConfig
Provides a set of configurations for controlling the caching behaviour of the endpoint.
Closed record
Fields
- enabled boolean(default true)
- capacity int(default 16)
- evictionFactor float(default 0.2)
- policy CachingPolicy(default CACHE_CONTROL_AND_VALIDATORS)
Specifies whether HTTP caching is enabled. Caching is enabled by default.
The capacity of the cache
The fraction of entries to be removed when the cache is full. The value should be between 0 (exclusive) and 1 (inclusive).
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.