]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: pools: centralize cache eviction in a common function
authorWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 16:19:14 +0000 (17:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 18:35:26 +0000 (19:35 +0100)
commita0b5831eedfc8f1bd1757c02140b68e9d7d43bb0
treea79ab0cb890351ad8f397e4327b4b59c657ea331
parent337410c5a4b5ac296cbf44fc579aa666286670b8
MEDIUM: pools: centralize cache eviction in a common function

We currently have two functions to evict cold objects from local caches:
pool_evict_from_local_cache() to evict from a single cache, and
pool_evict_from_local_caches() to evict oldest objects from all caches.

The new function pool_evict_last_items() focuses on scanning oldest
objects from a pool and releasing a predefined number of them, either
to the shared pool or to the system. For now they're evicted one at a
time, but the next step will consist in creating clusters.
src/pool.c