MINOR: cache: Do not store stale entry
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 3 Dec 2020 17:19:29 +0000 (18:19 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 4 Dec 2020 09:21:56 +0000 (10:21 +0100)
commit795e1412b00c76c3a42effd9158b5d8b2f30100d
tree202d46ecc9eb3a1609f8bd80f1ee0c9e0a86d3db
parentb931f964e13700bbf43419c05a37a503bcfb555b
MINOR: cache: Do not store stale entry

When a response has an Age header (filled in by another cache on the
message's path) that is greater than its defined maximum age (extracted
either from cache-control directives or an expires header), it is
already stale and should not be cached.
reg-tests/cache/caching_rules.vtc
src/cache.c