# multilevel

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

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

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/caches/multilevel.md -->

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

Combines multiple caches as levels, performing read-through and write-through operations across them.

```yml
caches:
  multilevel:
    - label: ""
      memory:
        default_ttl: 5m
        compaction_interval: 60s
    - label: ""
      redis:
        url: redis://localhost:6379
        expiration: 24h
```

## [](#examples)Examples

### [](#hot-and-cold-cache)Hot and cold cache

The multilevel cache is useful for reducing traffic against a remote cache by routing it through a local cache. In the following example requests will only go through to the memcached server if the local memory cache is missing the key.

```yaml
pipeline:
  processors:
    - branch:
        processors:
          - cache:
              resource: leveled
              operator: get
              key: ${! json("key") }
          - catch:
            - mapping: 'root = {"err":error()}'
        result_map: 'root.result = this'

cache_resources:
  - label: leveled
    multilevel: [ hot, cold ]

  - label: hot
    memory:
      default_ttl: 60s

  - label: cold
    memcached:
      addresses: [ TODO:11211 ]
      default_ttl: 60s
```