Skip to main content

CacheConfig

Configuration for a new Cache instance.

Signature

getKey

property(id: string | number) => string

A function which generates a cache key from the given id. This key will be used to store the value in the cache.

By convention, the key should be namespaced to avoid conflicts.

Example

Ts

options

Options available when setting the value in the cache.

Was this chapter helpful?
Report Issue
Edited Jan 28, 2026ยทEdit this page