]> git.kaiwu.me - haproxy.git/commit
MEDIUM: cache: early hints-aware eviction code
authorMaxime Henrion <mhenrion@haproxy.com>
Tue, 30 Jun 2026 15:06:12 +0000 (11:06 -0400)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Jul 2026 14:42:35 +0000 (16:42 +0200)
commit77c4de1ec2fb1968457002b8d5ac87a0ad91263a
tree3ceed6a0f9a1c88e69dd5987521265fb316ac4bd
parentb089325f0e9903c18614c426cd038d3af95723e6
MEDIUM: cache: early hints-aware eviction code

We now use the make_room callback from shctx to customize the eviction
procedure. We attempt to balance eviction between hints and full-blown
entries by capping the number of blocks used by hints entries to 25% of
the size of the cache. Upon eviction of a full entry, we first try to
strip it to a hints-only entry if possible.

A Link header's value (which may carry multiple comma-separated links)
is limited to 1024 bytes for hint extraction. Longer values are skipped
entirely and contribute no hint records.
src/cache.c