]> git.kaiwu.me - haproxy.git/commit
MEDIUM: cache: Resolve cache rules during the check stage
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 2 Oct 2026 16:06:07 +0000 (18:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:36 +0000 (16:17 +0200)
commit2b59385fbf98fdfdda46ed43c9a521e893ebe003
tree999d1d77920c5fd25d8047ce0b37b6e2808af074
parente9bfbe8ba7a83cb5452303185cecd771d51c38c0
MEDIUM: cache: Resolve cache rules during the check stage

A "cache-store"/"cache-use" rule needs the cache-store filter configuration
with the same cache name. Resolving it while parsing only works with the
legacy filter configurations, because the filter instances are not
finalized yet.

Store the cache name in the rule during parsing, keep creating the implicit
filter instance, and resolve the configuration from the rule check
callback with flt_find_conf(). This works in both modes: legacy mode still
creates the legacy configuration on demand as before, and instance mode
finds the finalized instance.

The name is now owned by the rule until the check stage, and by the legacy
configuration afterwards.
src/cache.c