StaleFallbackOptions
Defined in: src/cache.ts:236
Extends
Section titled “Extends”Pick<CacheOptions<T>,"name"|"key"|"shouldServeStale"|"onStaleServed">
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”
optionalkey?: (context) =>string|undefined
Defined in: src/cache.ts:96
Cache key for the execution; undefined bypasses the cache. Default: context.operationKey.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”string | undefined
Inherited from
Section titled “Inherited from”Pick.key
maxAge
Section titled “maxAge”maxAge:
Duration
Defined in: src/cache.ts:238
How old a last-good value may be and still be served.
maxEntries?
Section titled “maxEntries?”
optionalmaxEntries?:number
Defined in: src/cache.ts:240
Bound on remembered keys (LRU). Default 1000.
optionalname?:string
Defined in: src/cache.ts:94
Inherited from
Section titled “Inherited from”Pick.name
onStaleServed?
Section titled “onStaleServed?”
optionalonStaleServed?: (args) =>MaybePromise<void>
Defined in: src/cache.ts:111
Parameters
Section titled “Parameters”Returns
Section titled “Returns”MaybePromise<void>
Inherited from
Section titled “Inherited from”Pick.onStaleServed
shouldServeStale?
Section titled “shouldServeStale?”
optionalshouldServeStale?:ShouldHandle<OutcomeArgs<T>>
Defined in: src/cache.ts:106
Failures a stale value may hide. Default: every failure except aborts and client errors (4xx except 408/429).
Inherited from
Section titled “Inherited from”Pick.shouldServeStale
store?
Section titled “store?”
optionalstore?:CacheStore
Defined in: src/cache.ts:241