Explorar o código

fix: wrong item.time without the "expires" (#1740)

jianjianxu %!s(int64=3) %!d(string=hai) anos
pai
achega
a542317dc3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/utils/cache/memory.ts

+ 1 - 1
src/utils/cache/memory.ts

@@ -58,7 +58,7 @@ export class Memory<T = any, V = any> {
       return value;
     }
     const now = new Date().getTime();
-    item.time = now + this.alive;
+    item.time = now + expires;
     item.timeoutId = setTimeout(
       () => {
         this.remove(key);