Kaynağa Gözat

Fix stats cache expiration time

poeti8 7 yıl önce
ebeveyn
işleme
9a299ed71c
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  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;