Skip to main content
Learn how to use the Redis Storage Adapter for multi-pod deployments.

When to Use

Use RedisStorageAdapter when:
  • Running multiple pods/instances
  • You need shared cache across the cluster
  • You want TTL-based cache expiration

Configuration

src/storage/redis-adapter.ts

Options

Redis Client

Any Redis client with this interface works:
src/redis-interface.ts

With ioredis

src/ioredis.ts

With redis

src/node-redis.ts

TTL Configuration

Set TTL based on your cache invalidation strategy:
src/redis-ttl.ts
Set TTL longer than your typical deployment cycle. The cache will be invalidated by toolsHash changes anyway.

Redis Key Structure

The adapter creates keys like:
Format: {keyPrefix}:{namespace}

Multi-Tenant Setup

src/redis-multi-tenant.ts

Connection Handling

The adapter doesn’t manage the Redis connection lifecycle:
src/redis-lifecycle.ts

Error Handling

src/redis-errors.ts

Storage Overview

Storage fundamentals

File Adapter

Single-server storage

Deployment

Docker setup