Interface RedisCheckpointSaverOptions

Configuration options for the Redis checkpoint saver.

Example

// Basic configuration with default Redis URL
const options: RedisCheckpointSaverOptions = {
ttl: 3600 // Store checkpoints for 1 hour
};

Example

// Configuration with custom Redis URL
const options: RedisCheckpointSaverOptions = {
url: "redis://username:[email protected]:6379/0",
ttl: 86400 // 1 day TTL
};

Example

// Using an existing Redis client
import { createClient } from "redis";
// or import IORedis from "ioredis";

const redisClient = createClient({
url: "redis://localhost:6379",
socket: {
reconnectStrategy: (retries) => Math.min(retries * 50, 1000)
}
});
await redisClient.connect();

const options: RedisCheckpointSaverOptions = {
client: redisClient,
ttl: 7200 // 2 hours TTL
};
interface RedisCheckpointSaverOptions {
    client?: any;
    ttl?: number;
    url?: string;
}

Properties

Properties

client?: any

Pre-configured Redis client (can be either node-redis or ioredis client)

ttl?: number

Optional TTL in seconds for stored checkpoints

url?: string

Redis URL (default: redis://localhost:6379)