mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-26 01:37:28 +00:00
Sweep caches more frequently
This commit is contained in:
parent
3efc4928a5
commit
9a416a643b
@ -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() {
|
||||
|
@ -38,6 +38,7 @@ let constants = {
|
||||
resource_cache_time: 30*60*1000,
|
||||
instance_list_cache_time: 3*60*1000,
|
||||
updater_cache_time: 2*60*1000,
|
||||
cache_sweep_interval: 3*60*1000,
|
||||
db_user_id: true,
|
||||
db_post_n3: true
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user