ristretto¶
Tags: Ristretto
Stores key/value pairs in a map held in the memory-bound Ristretto cache.
YAML Configuration¶
Common Config¶
This cache is more efficient and appropriate for high-volume use cases than the standard memory cache. However, the add command is non-atomic, and therefore this cache is not suitable for deduplication.
Fields¶
default_ttl
¶
A default TTL to set for items, calculated from the moment the item is cached. Set to an empty string or zero duration to disable TTLs.
Type: string
Default: ""
get_retries
¶
Determines how and whether get attempts should be retried if the key is not found. Ristretto is a concurrent cache that does not immediately reflect writes, and so it can sometimes be useful to enable retries at the cost of speed in cases where the key is expected to exist.
Type: object
get_retries.enabled
¶
Whether retries should be enabled.
Type: bool
Default: false
get_retries.initial_interval
¶
The initial period to wait between retry attempts.
Type: string
Default: "1s"
get_retries.max_interval
¶
The maximum period to wait between retry attempts
Type: string
Default: "5s"
get_retries.max_elapsed_time
¶
The maximum overall period of time to spend on retry attempts before the request is aborted.
Type: string
Default: "30s"