소스 검색

Increase cache times

Zed 7 년 전
부모
커밋
4bf38f71f3
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/api.nim
  2. 1 1
      src/cache.nim

+ 1 - 1
src/api.nim

@@ -21,7 +21,7 @@ const
 var
   token = ""
   tokenUpdated: Time
-  tokenLifetime = initDuration(minutes=10)
+  tokenLifetime = initDuration(hours=2)
 
 template newClient() {.dirty.} =
   var client = newAsyncHttpClient()

+ 1 - 1
src/cache.nim

@@ -7,7 +7,7 @@ withDb:
   except DbError:
     discard
 
-var profileCacheTime = initDuration(seconds=60)
+var profileCacheTime = initDuration(minutes=10)
 
 proc outdated(profile: Profile): bool =
   getTime() - profile.updated > profileCacheTime