|
@@ -16,19 +16,19 @@ exports.isAdmin = email => config.ADMIN_EMAILS.includes(email);
|
|
|
exports.getStatsCacheTime = total => {
|
|
exports.getStatsCacheTime = total => {
|
|
|
switch (true) {
|
|
switch (true) {
|
|
|
case total <= 5000:
|
|
case total <= 5000:
|
|
|
- return ms('15 minutes') / 1000;
|
|
|
|
|
|
|
+ return ms('5 minutes') / 1000;
|
|
|
|
|
|
|
|
case total > 5000 && total < 20000:
|
|
case total > 5000 && total < 20000:
|
|
|
- return ms('1 hour') / 1000;
|
|
|
|
|
|
|
+ return ms('10 minutes') / 1000;
|
|
|
|
|
|
|
|
case total < 40000:
|
|
case total < 40000:
|
|
|
- return ms('3 hours') / 1000;
|
|
|
|
|
|
|
+ return ms('15 minutes') / 1000;
|
|
|
|
|
|
|
|
case total > 40000:
|
|
case total > 40000:
|
|
|
- return ms('6 hours') / 1000;
|
|
|
|
|
|
|
+ return ms('30 minutes') / 1000;
|
|
|
|
|
|
|
|
default:
|
|
default:
|
|
|
- return ms('15 minutes') / 1000;
|
|
|
|
|
|
|
+ return ms('5 minutes') / 1000;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|