Преглед на файлове

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

jianjianxu преди 3 години
родител
ревизия
a542317dc3
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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);