]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cache: Improve and simplify the cache configuration check
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 7 Dec 2018 16:34:39 +0000 (17:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 16:09:31 +0000 (17:09 +0100)
commit95220e2ed83632ed2c2aee2d79eb30b9676dbea7
treece3b380e91ab206d5c7f8734ed69b43abb182fed
parent54a8d5a4a0395f1eb4f0c6ae13ceb00c6f4cd89a
MINOR: cache: Improve and simplify the cache configuration check

To do so, a dedicated configuration has been added on cache filters. Before the
cache filter configuration pointed directly to the cache it used. Now, it is the
dedicated structure cache_flt_conf. Store and use rules also point to this
structure. It is linked to the cache the filter must used. It also contains a
flags field. This will allow us to define the behavior of a cache filter when a
response is stored in the cache or delivered from it.

And now, Store and use rules uses a common parsing function. So if it does not
already exists, a filter is always created for both kind of rules. The cache
filters configuration is checked using their check callback. In the postparser
function, we only check the caches configuration. This removes the loop on all
proxies in the postparser function.
src/cache.c