Clear song cache every 12 hours

This commit is contained in:
Dragon Fire
2021-03-13 16:03:57 -05:00
parent 38ddb382a5
commit bc164a2a97
+4 -1
View File
@@ -86,7 +86,10 @@ module.exports = class GuessSongCommand extends Command {
csvParse(text, { comment: '#' }, (err, output) => {
if (err) return rej(err);
this.charts = output.slice(2).map(song => song[4].replace('https://open.spotify.com/track/', ''));
setTimeout(() => { this.charts = null; }, 4.32e+7);
setTimeout(() => {
this.charts = null;
this.cache.clear();
}, 4.32e+7);
return res(this.charts);
});
});