Przeglądaj źródła

Fix stats cache expiration time

poeti8 7 lat temu
rodzic
commit
9a299ed71c
1 zmienionych plików z 3 dodań i 0 usunięć
  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;