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);
|
return Object.values(communityPostsByKey);
|
||||||
};
|
};
|
||||||
|
|
||||||
setInterval(() => {
|
if (!global.clearProfileInterval) {
|
||||||
debugProfile("Clearing profile cache");
|
global.clearProfileInterval = setInterval(() => {
|
||||||
profileCache = {};
|
debugProfile("Clearing profile cache");
|
||||||
}, 5 * 60 * 1000);
|
profileCache = {};
|
||||||
|
}, 5 * 60 * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mapProfiles,
|
mapProfiles,
|
||||||
|
|
Loading…
Reference in New Issue