Browse Source

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

pull/1742/head
jianjianxu 5 years ago
committed by GitHub
parent
commit
a542317dc3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/utils/cache/memory.ts

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

Loading…
Cancel
Save