class RedisCacheAdapter
implements CacheAdapter

Redis-backed cache adapter using GET/SET/DEL with optional TTL via PX.

Constructors

RedisCacheAdapter(
redis: RedisClient,
prefix: string
)

Methods

close(): Promise<void>
delete(key: string): Promise<void>
get(key: string): Promise<unknown | null>
has(key: string): Promise<boolean>
set(
key: string,
value: unknown,
options?: SetOptions
): Promise<void>

Usage

import { RedisCacheAdapter } from ".";