diff --git a/src/lib/cache.js b/src/lib/cache.js index 5524980..107fc00 100644 --- a/src/lib/cache.js +++ b/src/lib/cache.js @@ -9,6 +9,9 @@ class TtlCache { this.ttl = ttl /** @type {Map} */ this.cache = new Map() + this.sweepInterval = setInterval(() => { + this.clean() + }, this.ttl) } clean() {