@sebspark/promise-cache 4.0.0 → 4.0.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.
package/dist/index.js CHANGED
@@ -159,7 +159,7 @@ var Persistor = class {
159
159
  return !!this.client?.isReady;
160
160
  }
161
161
  createOptions(ttl) {
162
- if (ttl !== null && ttl !== void 0) {
162
+ if (ttl !== null && ttl !== void 0 && ttl > 0) {
163
163
  return { PX: Math.round(toMillis(ttl)) };
164
164
  }
165
165
  return {};
package/dist/index.mjs CHANGED
@@ -140,7 +140,7 @@ var Persistor = class {
140
140
  return !!this.client?.isReady;
141
141
  }
142
142
  createOptions(ttl) {
143
- if (ttl !== null && ttl !== void 0) {
143
+ if (ttl !== null && ttl !== void 0 && ttl > 0) {
144
144
  return { PX: Math.round(toMillis(ttl)) };
145
145
  }
146
146
  return {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/promise-cache",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",