]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: cache: Avoid going over duplicates lists too often
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 10 Dec 2020 16:58:42 +0000 (17:58 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 15 Dec 2020 15:35:09 +0000 (16:35 +0100)
commit73be796462d5d96672a7082ec1023ee87d63a4fb
tree13f7c7f15c1251cdc1bc050a92ef6cd8bb98a3b1
parent65904e4f07e6ac416178549dbc7385929d0b0ebc
MEDIUM: cache: Avoid going over duplicates lists too often

The secondary entry counter cannot be updated without going over all the
items of a duplicates list periodically. In order to avoid doing it too
often and to impact the cache's performances, a timestamp is added to
the cache_entry. It will store the timestamp (with second precision) of
the last iteration over the list (actually the last call of the
clear_expired_duplicates function). This way, this function will not be
called more than once per second for a given duplicates list.
src/cache.c