Skip to content

Interface: MetadataCacheOptions\<T\>

Factory inputs for one named metadata cache.

T

readonly fallback: T

Hard-coded / committed baseline used when store and load both miss.


readonly key: string

Stable cache key.


readonly optional load?: () => Promise<T>

Optional refresh source.

Promise<T>


readonly merge: (input) => T

Combine a fresh load, prior store value, and the hard-coded fallback.

MetadataCacheMergeInput<T>

T


readonly optional ttlMs?: number

Freshness window; defaults to one day.