]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: pools: make pool_put_to_cache() always call pool_put_to_local_cache()
authorWilly Tarreau <w@1wt.eu>
Mon, 19 Apr 2021 06:50:45 +0000 (08:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Apr 2021 13:24:33 +0000 (15:24 +0200)
commitfa19d20ac4fbfc04441143128108f5d8807bf983
treec05042ff76fa620237a18afe089a086a6b8d1e91
parent87212036a1d63ea9cdd74fb5cb5234ad81bf0ddb
MEDIUM: pools: make pool_put_to_cache() always call pool_put_to_local_cache()

Till now it used to call it only if there were not too many objects into
the local cache otherwise would send the latest one directly into the
shared cache. Now it always sends to the local cache and it's up to the
local cache to free its oldest objects. From a cache freshness perspective
it's better this way since we always evict cold objects instead of hot
ones. From an API perspective it's better because it will help make the
shared cache invisible to the public API.
include/haproxy/pool.h
src/pool.c