Do not recreate interval on hot-reloads
This commit is contained in:
parent
ddd5bff147
commit
e6ce416dce
|
@ -668,10 +668,12 @@ const getCommunityPosts = async (name) => {
|
|||
return Object.values(communityPostsByKey);
|
||||
};
|
||||
|
||||
setInterval(() => {
|
||||
if (!global.clearProfileInterval) {
|
||||
global.clearProfileInterval = setInterval(() => {
|
||||
debugProfile("Clearing profile cache");
|
||||
profileCache = {};
|
||||
}, 5 * 60 * 1000);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mapProfiles,
|
||||
|
|
Loading…
Reference in New Issue