Explorar o código

Fix stats cache expiration time

poeti8 %!s(int64=7) %!d(string=hai) anos
pai
achega
9a299ed71c
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      server/utils/index.js

+ 3 - 0
server/utils/index.js

@@ -14,6 +14,9 @@ exports.isAdmin = email => config.ADMIN_EMAILS.includes(email);
 
 exports.getStatsCacheTime = total => {
   switch (true) {
+    case total <= 5000:
+      return ms('15 minutes') / 1000;
+
     case total > 5000 && total < 20000:
       return ms('1 hour') / 1000;