فهرست منبع

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);