diff --git a/index.ts b/index.ts index 57ea503..2d96bce 100644 --- a/index.ts +++ b/index.ts @@ -116,7 +116,9 @@ export class Index< baseUrl: url, retry: configOrRequester?.retry, headers: { authorization: `Bearer ${token}` }, - cache: configOrRequester?.cache || "no-store", + cache: configOrRequester?.cache === false + ? undefined + : configOrRequester?.cache || "no-store", signal: configOrRequester?.signal, }); diff --git a/src/http/index.ts b/src/http/index.ts index 1344842..97b2b46 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -6,7 +6,8 @@ type CacheSetting = | "no-cache" | "no-store" | "only-if-cached" - | "reload"; + | "reload" + | false; export type UpstashRequest = { path?: string[];