Skip to content

CacheStore

Defined in: src/policies/traffic/cache.ts:32

Pluggable cache storage backend

delete(key): Promise<boolean>

Defined in: src/policies/traffic/cache.ts:38

Delete a cached entry. Returns true if something was removed.

string

Promise<boolean>


optional destroy(): void

Defined in: src/policies/traffic/cache.ts:40

Optional cleanup - clear expired entries, release resources.

void


get(key): Promise<Response | null>

Defined in: src/policies/traffic/cache.ts:34

Retrieve a cached response by key. Returns null on miss.

string

Promise<Response | null>


put(key, response, ttlSeconds): Promise<void>

Defined in: src/policies/traffic/cache.ts:36

Store a response under key with a TTL in seconds.

string

Response

number

Promise<void>