MINOR: cache: Reject duplicate cache names
authorTim Duesterhus <tim@bastelstu.be>
Tue, 18 Aug 2020 20:20:27 +0000 (22:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 18 Aug 2020 20:51:24 +0000 (22:51 +0200)
commitff4d86becd658f61e45692815f3b9e7a1e66107f
tree899dcae3811b92cb164d4e4a5340cc1edac8f8c2
parentea969f6f26adfa081df0d439723813cfcd4862c4
MINOR: cache: Reject duplicate cache names

Using a duplicate cache name most likely is the result of a misgenerated
configuration. There is no good reason to allow this, as the duplicate
caches can't be referred to.

This commit resolves GitHub issue #820.

It can be argued whether this is a fix for a bug or not. I'm erring on the
side of caution and marking this as a "new feature". It can be considered for
backporting to 2.2, but for other branches the risk of accidentally breaking
some working (but non-ideal) configuration might be too large.
src/cache.c