]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cache: replace old object on store
authorWilly Tarreau <w@1wt.eu>
Fri, 22 Dec 2017 16:42:46 +0000 (17:42 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Dec 2017 16:56:18 +0000 (17:56 +0100)
commitc9bd34c7e0b0b4845d058c67c55fb0600a339919
treed58dea30e64bda3983a2f4d29a8bb587555bf8d1
parent7704b1e89a202c5b09d89fbc50f042a18113a839
BUG/MEDIUM: cache: replace old object on store

Currently the cache aborts a store operation if the object to store
already exists in the cache. This is used to avoid storing multiple
copies at the same time on concurrent accesses. It causes an issue
though, which is that existing unexpired objects cannot be updated.
This happens when any request criterion disables the retrieval from
the cache (eg: with max-age or any other cache-control condition).

For now, let's simply replace the previous existing entry by unlinking
it from the index. This could possibly be improved in the future if
needed.

This fix needs to be backported to 1.8.
src/cache.c