# ristretto

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

---
title: ristretto
latest-connect-version: 4.93.0
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-redpanda-tag: v26.1.9
docname: caches/ristretto
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: caches/ristretto.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/caches/ristretto.adoc
page-git-created-date: "2024-05-24"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/connect/components/caches/ristretto.md -->

**Available in:** [Cloud](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/caches/ristretto/%20%22View%20the%20Cloud%20version%20of%20this%20component%22), Self-Managed

Stores key/value pairs in a map held in the memory-bound [Ristretto cache](https://github.com/dgraph-io/ristretto).

#### Common

```yml
caches:
  ristretto:
    default_ttl: ""
```

#### Advanced

```yml
caches:
  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)Fields

### [](#default_ttl)`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**: `""`

```yaml
# Examples:
default_ttl: 5m

# ---

default_ttl: 60s
```

### [](#get_retries)`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)`get_retries.enabled`

Whether retries should be enabled.

**Type**: `bool`

**Default**: `false`

### [](#get_retries-initial_interval)`get_retries.initial_interval`

The initial period to wait between retry attempts.

**Type**: `string`

**Default**: `1s`

```yaml
# Examples:
initial_interval: 50ms

# ---

initial_interval: 1s
```

### [](#get_retries-max_elapsed_time)`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`

```yaml
# Examples:
max_elapsed_time: 1m

# ---

max_elapsed_time: 1h
```

### [](#get_retries-max_interval)`get_retries.max_interval`

The maximum period to wait between retry attempts

**Type**: `string`

**Default**: `5s`

```yaml
# Examples:
max_interval: 5s

# ---

max_interval: 1m
```