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.
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.
Returns a wrapped version of fn that writes its result into the cache. Key is derived from the result, not the args — handles the create-with-generated-id case cleanly.
Optionaloptions: CacheWrapWriteOptionsArgsOnly<TArgs, CacheTag>
Write‑invalidate (key from arguments) read‑through cache.
After the source write succeeds, the cache entry identified by the argument‑derived key is deleted, and optional tag invalidations are fired.