mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: cache package search results with Redis
The queries being done on the package search page are quite costly. (Especially the default one ordered by "Popularity" when navigating to /packages) Let's add the search results to the Redis cache: Every result of a search query is being pushed to Redis until we hit our maximum of 50k. An entry expires after 3 minutes before it's evicted from the cache. Lifetime an Max values are configurable. Signed-off-by: moson-mo <mo-son@mailbox.org>
This commit is contained in:
parent
7c8b9ba6bc
commit
3acfb08a0f
8 changed files with 173 additions and 74 deletions
|
@ -165,3 +165,9 @@ commit_url = https://gitlab.archlinux.org/archlinux/aurweb/-/commits/%s
|
|||
; voted on based on `now + range_start <= End <= now + range_end`.
|
||||
range_start = 500
|
||||
range_end = 172800
|
||||
|
||||
[cache]
|
||||
; maximum number of keys/entries (for search results) in our redis cache, default is 50000
|
||||
max_search_entries = 50000
|
||||
; number of seconds after a cache entry expires, default is 3 minutes
|
||||
expiry_time = 180
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue