mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
New constants/config merge system
This commit is contained in:
parent
fb6081a719
commit
cf8fd6b86b
8 changed files with 43 additions and 9 deletions
|
|
@ -18,7 +18,7 @@ class User {
|
|||
}
|
||||
|
||||
getTtl(scale = 1) {
|
||||
const expiresAt = this.cachedAt + constants.resource_cache_time
|
||||
const expiresAt = this.cachedAt + constants.caching.resource_cache_time
|
||||
const ttl = expiresAt - Date.now()
|
||||
return Math.ceil(Math.max(ttl, 0) / scale)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue