Skip to content

RedisCacheStore

Defined in: src/redis.ts:42

CacheStore over Redis: entries are JSON (so values must be JSON-serializable) and expire natively after ttlMs.

new RedisCacheStore(options): RedisCacheStore

Defined in: src/redis.ts:46

RedisStoreOptions

RedisCacheStore

delete(key): Promise<void>

Defined in: src/redis.ts:59

string

Promise<void>

CacheStore.delete


get(key): Promise<CacheEntry | undefined>

Defined in: src/redis.ts:51

string

Promise<CacheEntry | undefined>

CacheStore.get


set(key, entry, ttlMs): Promise<void>

Defined in: src/redis.ts:55

ttlMs is how long the entry can still be useful (ttl + staleTtl): remote stores can expire it natively.

string

CacheEntry

number

Promise<void>

CacheStore.set