@solvapay/server 1.0.8 → 1.0.9-preview-2d441ba65ef09e7a0e3906ab9e7206002001d22a
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/edge.js +3 -1
- package/dist/fetch/index.cjs +3 -1
- package/dist/fetch/index.js +3 -1
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/edge.js
CHANGED
|
@@ -693,7 +693,8 @@ function createRequestDeduplicator(options = {}) {
|
|
|
693
693
|
const inFlightRequests = /* @__PURE__ */ new Map();
|
|
694
694
|
const resultCache = /* @__PURE__ */ new Map();
|
|
695
695
|
let _cleanupInterval = null;
|
|
696
|
-
|
|
696
|
+
function ensureCleanupInterval() {
|
|
697
|
+
if (_cleanupInterval || cacheTTL <= 0) return;
|
|
697
698
|
_cleanupInterval = setInterval(
|
|
698
699
|
() => {
|
|
699
700
|
const now = Date.now();
|
|
@@ -720,6 +721,7 @@ function createRequestDeduplicator(options = {}) {
|
|
|
720
721
|
);
|
|
721
722
|
}
|
|
722
723
|
const deduplicate = async (key, fn) => {
|
|
724
|
+
ensureCleanupInterval();
|
|
723
725
|
if (cacheTTL > 0) {
|
|
724
726
|
const cached = resultCache.get(key);
|
|
725
727
|
if (cached && Date.now() - cached.timestamp < cacheTTL) {
|
package/dist/fetch/index.cjs
CHANGED
|
@@ -882,7 +882,8 @@ function createRequestDeduplicator(options = {}) {
|
|
|
882
882
|
const inFlightRequests = /* @__PURE__ */ new Map();
|
|
883
883
|
const resultCache = /* @__PURE__ */ new Map();
|
|
884
884
|
let _cleanupInterval = null;
|
|
885
|
-
|
|
885
|
+
function ensureCleanupInterval() {
|
|
886
|
+
if (_cleanupInterval || cacheTTL <= 0) return;
|
|
886
887
|
_cleanupInterval = setInterval(
|
|
887
888
|
() => {
|
|
888
889
|
const now = Date.now();
|
|
@@ -909,6 +910,7 @@ function createRequestDeduplicator(options = {}) {
|
|
|
909
910
|
);
|
|
910
911
|
}
|
|
911
912
|
const deduplicate = async (key, fn) => {
|
|
913
|
+
ensureCleanupInterval();
|
|
912
914
|
if (cacheTTL > 0) {
|
|
913
915
|
const cached = resultCache.get(key);
|
|
914
916
|
if (cached && Date.now() - cached.timestamp < cacheTTL) {
|
package/dist/fetch/index.js
CHANGED
|
@@ -829,7 +829,8 @@ function createRequestDeduplicator(options = {}) {
|
|
|
829
829
|
const inFlightRequests = /* @__PURE__ */ new Map();
|
|
830
830
|
const resultCache = /* @__PURE__ */ new Map();
|
|
831
831
|
let _cleanupInterval = null;
|
|
832
|
-
|
|
832
|
+
function ensureCleanupInterval() {
|
|
833
|
+
if (_cleanupInterval || cacheTTL <= 0) return;
|
|
833
834
|
_cleanupInterval = setInterval(
|
|
834
835
|
() => {
|
|
835
836
|
const now = Date.now();
|
|
@@ -856,6 +857,7 @@ function createRequestDeduplicator(options = {}) {
|
|
|
856
857
|
);
|
|
857
858
|
}
|
|
858
859
|
const deduplicate = async (key, fn) => {
|
|
860
|
+
ensureCleanupInterval();
|
|
859
861
|
if (cacheTTL > 0) {
|
|
860
862
|
const cached = resultCache.get(key);
|
|
861
863
|
if (cached && Date.now() - cached.timestamp < cacheTTL) {
|
package/dist/index.cjs
CHANGED
|
@@ -761,7 +761,8 @@ function createRequestDeduplicator(options = {}) {
|
|
|
761
761
|
const inFlightRequests = /* @__PURE__ */ new Map();
|
|
762
762
|
const resultCache = /* @__PURE__ */ new Map();
|
|
763
763
|
let _cleanupInterval = null;
|
|
764
|
-
|
|
764
|
+
function ensureCleanupInterval() {
|
|
765
|
+
if (_cleanupInterval || cacheTTL <= 0) return;
|
|
765
766
|
_cleanupInterval = setInterval(
|
|
766
767
|
() => {
|
|
767
768
|
const now = Date.now();
|
|
@@ -788,6 +789,7 @@ function createRequestDeduplicator(options = {}) {
|
|
|
788
789
|
);
|
|
789
790
|
}
|
|
790
791
|
const deduplicate = async (key, fn) => {
|
|
792
|
+
ensureCleanupInterval();
|
|
791
793
|
if (cacheTTL > 0) {
|
|
792
794
|
const cached = resultCache.get(key);
|
|
793
795
|
if (cached && Date.now() - cached.timestamp < cacheTTL) {
|
package/dist/index.js
CHANGED
|
@@ -694,7 +694,8 @@ function createRequestDeduplicator(options = {}) {
|
|
|
694
694
|
const inFlightRequests = /* @__PURE__ */ new Map();
|
|
695
695
|
const resultCache = /* @__PURE__ */ new Map();
|
|
696
696
|
let _cleanupInterval = null;
|
|
697
|
-
|
|
697
|
+
function ensureCleanupInterval() {
|
|
698
|
+
if (_cleanupInterval || cacheTTL <= 0) return;
|
|
698
699
|
_cleanupInterval = setInterval(
|
|
699
700
|
() => {
|
|
700
701
|
const now = Date.now();
|
|
@@ -721,6 +722,7 @@ function createRequestDeduplicator(options = {}) {
|
|
|
721
722
|
);
|
|
722
723
|
}
|
|
723
724
|
const deduplicate = async (key, fn) => {
|
|
725
|
+
ensureCleanupInterval();
|
|
724
726
|
if (cacheTTL > 0) {
|
|
725
727
|
const cached = resultCache.get(key);
|
|
726
728
|
if (cached && Date.now() - cached.timestamp < cacheTTL) {
|