CacheConfig
Type Alias: CacheConfig
Section titled “Type Alias: CacheConfig”CacheConfig =
object
Defined in: packages/fetch-kit/src/types.ts:80
Default-cache configuration applied at client creation.
Properties
Section titled “Properties”autoCacheGet?
Section titled “autoCacheGet?”
optionalautoCacheGet?:boolean
Defined in: packages/fetch-kit/src/types.ts:94
When true, GET requests (and GraphQL queries) are cached automatically.
Defaults to true when a CacheConfig is supplied. Set explicitly to
false to require per-request opt-in.
keyFn?
Section titled “keyFn?”
optionalkeyFn?: (method,url,body) =>string
Defined in: packages/fetch-kit/src/types.ts:88
Compute the cache key. Defaults to "<METHOD> <url> [body fingerprint]".
Parameters
Section titled “Parameters”method
Section titled “method”string
unknown
Returns
Section titled “Returns”string
maxSize?
Section titled “maxSize?”
optionalmaxSize?:number
Defined in: packages/fetch-kit/src/types.ts:84
Maximum entries kept in the default in-memory store. Defaults to 100.
store?
Section titled “store?”
optionalstore?:CacheStore
Defined in: packages/fetch-kit/src/types.ts:86
Custom store (e.g. localStorage-backed, Redis). Overrides maxSize.
optionalttl?:number
Defined in: packages/fetch-kit/src/types.ts:82
Default time-to-live for cache entries in milliseconds. Defaults to 60_000.