always delete the throttled cleanup functions once they have run

This commit is contained in:
ansuz 2020-12-08 16:50:37 +05:30
parent 4495d99e49
commit e6a4c68863

View file

@ -121,9 +121,9 @@ module.exports.create = function (config) {
Env.checkCache = function (channel) {
var f = Env.cache_checks[channel] || Util.throttle(function () {
delete Env.cache_checks[channel];
if (Env.channel_cache[channel]) { return; }
delete Env.metadata_cache[channel];
delete Env.cache_checks[channel];
}, 30000);
f();
};