AbstractOptionaldefaultTtl: number | (() => number | Promise<number>)OptionalonInvalidationFailure: OnInvalidationFailureReadonly_Phantom carrier, only for type inference.
Optional ReadonlydefaultThe default time to live for a cached value.
ReadonlynameThe name of the cache. Should be unique.
Optional ReadonlyonWhether to throw when invalidation fails or to just log and ignore.
ReadonlystoreThe store used by this cache.
ReadonlytagsThe tags that any values inside of this cache might have.
This is used for performance improvements, to skip caches for invalidateTags if the given tag will never be inside any of the cached values. Can be set to 'all' to check every time.
Directly write a value into this cache, following its configured write strategy.
Use this instead of wrapWrite when the source function has already
been called and you only need to propagate the result.
Optionaloptions: CacheSetDirectOptions<CacheTag>Returns a wrapped version of fn that invalidates a cache entry after call.
Optionaloptions: CacheWrapDeleteOptions<TArgs, CacheTag>Calls fn → Invalidates tags → Returns the fn result. For operations that affect cached data but produce no cacheable result, e.g. CreateAll/updateAll on a collection cache where no filter key can be derived from the output.
Write‑behind read‑aside cache.
Writes update the source and then fire‑and‑forget a cache store. Reads (
wrap) check the cache but never populate it.