Skip to content

CacheOption

CacheOption = boolean | { bypass?: boolean; key?: string; ttl?: number; }

Defined in: packages/fetch-kit/src/types.ts:104

Per-request cache override.

  • false: bypass cache, do not read or write.
  • true: read+write using the client’s default TTL.
  • Object: read+write, but override TTL or key, or skip reads with bypass.

boolean


{ bypass?: boolean; key?: string; ttl?: number; }

optional bypass?: boolean

When true, ignore any cached value and fetch fresh. The fresh response is still written back to the cache.

optional key?: string

Override the computed cache key.

optional ttl?: number

Override the default TTL for this request.