mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: Separate cache expiry for stats and search
Allows us to set different cache eviction timespans for search queries and statistics. Stats and especially "last package updates" should probably be refreshed more often, whereas we might want to cache search results for a bit longer. So this gives us a bit more flexibility playing around with different settings and tweak things. Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
parent
44c158b8c2
commit
8699457917
4 changed files with 7 additions and 5 deletions
|
@ -89,7 +89,7 @@ class Statistics:
|
|||
|
||||
|
||||
def update_prometheus_metrics():
|
||||
cache_expire = config.getint("cache", "expiry_time")
|
||||
cache_expire = config.getint("cache", "expiry_time_statistics", 300)
|
||||
stats = Statistics(cache_expire)
|
||||
# Users gauge
|
||||
for counter, utype in stats.PROMETHEUS_USER_COUNTERS:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue