= ristretto :type: cache :status: stable //// THIS FILE IS AUTOGENERATED! To make changes, edit the corresponding source file under: https://github.com/redpanda-data/connect/tree/main/internal/impl/. And: https://github.com/redpanda-data/connect/tree/main/cmd/tools/docs_gen/templates/plugin.adoc.tmpl //// // © 2024 Redpanda Data Inc. component_type_dropdown::[] Stores key/value pairs in a map held in the memory-bound https://github.com/dgraph-io/ristretto[Ristretto cache^]. [tabs] ====== Common:: + -- ```yml # Common config fields, showing default values label: "" ristretto: default_ttl: "" ``` -- Advanced:: + -- ```yml # All config fields, showing default values label: "" ristretto: default_ttl: "" get_retries: enabled: false initial_interval: 1s max_interval: 5s max_elapsed_time: 30s ``` -- ====== 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*: `""` ```yml # Examples default_ttl: 5m default_ttl: 60s ``` === `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"` ```yml # Examples initial_interval: 50ms initial_interval: 1s ``` === `get_retries.max_interval` The maximum period to wait between retry attempts *Type*: `string` *Default*: `"5s"` ```yml # Examples max_interval: 5s max_interval: 1m ``` === `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"` ```yml # Examples max_elapsed_time: 1m max_elapsed_time: 1h ```