Increase cache times
This commit is contained in:
parent
06a54a5c32
commit
4bf38f71f3
|
@ -21,7 +21,7 @@ const
|
||||||
var
|
var
|
||||||
token = ""
|
token = ""
|
||||||
tokenUpdated: Time
|
tokenUpdated: Time
|
||||||
tokenLifetime = initDuration(minutes=10)
|
tokenLifetime = initDuration(hours=2)
|
||||||
|
|
||||||
template newClient() {.dirty.} =
|
template newClient() {.dirty.} =
|
||||||
var client = newAsyncHttpClient()
|
var client = newAsyncHttpClient()
|
||||||
|
|
|
@ -7,7 +7,7 @@ withDb:
|
||||||
except DbError:
|
except DbError:
|
||||||
discard
|
discard
|
||||||
|
|
||||||
var profileCacheTime = initDuration(seconds=60)
|
var profileCacheTime = initDuration(minutes=10)
|
||||||
|
|
||||||
proc outdated(profile: Profile): bool =
|
proc outdated(profile: Profile): bool =
|
||||||
getTime() - profile.updated > profileCacheTime
|
getTime() - profile.updated > profileCacheTime
|
||||||
|
|
Loading…
Reference in New Issue