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

This commit is contained in:
jianjianxu 2022-03-23 22:31:50 +08:00 committed by GitHub
parent e4305daf98
commit a542317dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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