]> git.ipfire.org Git - thirdparty/squid.git/commit
Support read-only ClpMap iteration by ClpMap users (#1409)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Thu, 6 Jul 2023 14:55:30 +0000 (14:55 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 7 Jul 2023 07:09:05 +0000 (07:09 +0000)
commit769210ed7f48bade03d6fb4783afa54473013f61
tree5c25cbb2ca4a2463c05f90c937101c7ca39d2558
parentc939f25a3110a6f39a40f3e0f5ded947cb76e0fc
Support read-only ClpMap iteration by ClpMap users (#1409)

This change makes it possible for anticipated future ClpMap users (e.g.,
stat_ipcache_get()) to report their cache contents. No changes to
ClpMap::Entry and related old types except making them public.

The alternative solution -- a visitor design pattern -- was rejected
because `for` loops are a bit easier to read than for_each() loops.

No Squid functionality changes expected.
src/base/ClpMap.h
src/tests/testClpMap.cc