@upstash/redis 1.21.0 → 1.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,7 @@ export class SetCommand extends Command {
28
28
  command.push("pxat", opts.pxat);
29
29
  }
30
30
  else if ("keepTtl" in opts && opts.keepTtl) {
31
- command.push("keepTtl", opts.keepTtl);
31
+ command.push("keepTtl");
32
32
  }
33
33
  }
34
34
  super(command, cmdOpts);
@@ -35,7 +35,7 @@ export class Redis extends core.Redis {
35
35
  headers: { authorization: `Bearer ${configOrRequester.token}` },
36
36
  agent: configOrRequester.agent,
37
37
  responseEncoding: configOrRequester.responseEncoding,
38
- cache: "no-store",
38
+ cache: configOrRequester.cache || "no-store",
39
39
  });
40
40
  super(client, {
41
41
  automaticDeserialization: configOrRequester.automaticDeserialization,
package/esm/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "v1.21.0";
1
+ export const VERSION = "v1.22.1";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/platforms/nodejs.js",
4
4
  "types": "./types/platforms/nodejs.d.ts",
5
5
  "name": "@upstash/redis",
6
- "version": "v1.21.0",
6
+ "version": "v1.22.1",
7
7
  "description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
8
8
  "repository": {
9
9
  "type": "git",
@@ -31,7 +31,7 @@ class SetCommand extends command_js_1.Command {
31
31
  command.push("pxat", opts.pxat);
32
32
  }
33
33
  else if ("keepTtl" in opts && opts.keepTtl) {
34
- command.push("keepTtl", opts.keepTtl);
34
+ command.push("keepTtl");
35
35
  }
36
36
  }
37
37
  super(command, cmdOpts);
@@ -61,7 +61,7 @@ class Redis extends core.Redis {
61
61
  headers: { authorization: `Bearer ${configOrRequester.token}` },
62
62
  agent: configOrRequester.agent,
63
63
  responseEncoding: configOrRequester.responseEncoding,
64
- cache: "no-store",
64
+ cache: configOrRequester.cache || "no-store",
65
65
  });
66
66
  super(client, {
67
67
  automaticDeserialization: configOrRequester.automaticDeserialization,
package/script/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "v1.21.0";
4
+ exports.VERSION = "v1.22.1";
@@ -62,6 +62,11 @@ export type RequesterConfig = {
62
62
  * @default "base64"
63
63
  */
64
64
  responseEncoding?: false | "base64";
65
+ /**
66
+ * Configure the cache behaviour
67
+ * @default "no-store"
68
+ */
69
+ cache?: CacheSetting;
65
70
  };
66
71
  export type HttpClientConfig = {
67
72
  headers?: Record<string, string>;
@@ -69,7 +74,6 @@ export type HttpClientConfig = {
69
74
  options?: Options;
70
75
  retry?: RetryConfig;
71
76
  agent?: any;
72
- cache?: CacheSetting;
73
77
  } & RequesterConfig;
74
78
  export declare class HttpClient implements Requester {
75
79
  baseUrl: string;
@@ -1 +1 @@
1
- export declare const VERSION = "v1.21.0";
1
+ export declare const VERSION = "v1.22.1";