Sweep caches more frequently

This commit is contained in:
Cadence Fish
2020-03-18 21:14:12 +13:00
parent 3efc4928a5
commit 9a416a643b
2 changed files with 4 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
const constants = require("./constants")
/**
* @template T
*/
@@ -11,7 +13,7 @@ class TtlCache {
this.cache = new Map()
this.sweepInterval = setInterval(() => {
this.clean()
}, this.ttl)
}, constants.caching.cache_sweep_interval)
}
clean() {