From: Otto Moerbeek Date: Fri, 6 Dec 2019 13:49:36 +0000 (+0100) Subject: Also invalidate cachecache on prune X-Git-Tag: dnsdist-1.5.0-alpha1~21^2^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cda5b6e8f5d4eb2f3e4ef1828850994dbae9442;p=thirdparty%2Fpdns.git Also invalidate cachecache on prune --- diff --git a/pdns/cachecleaner.hh b/pdns/cachecleaner.hh index 68118f35de..a29533c20e 100644 --- a/pdns/cachecleaner.hh +++ b/pdns/cachecleaner.hh @@ -174,6 +174,7 @@ template uint64_t pruneMutexCollectionsVect for (auto& mc : maps) { const std::lock_guard lock(mc.mutex); + mc.d_cachecachevalid = false; auto& sidx = boost::multi_index::get(mc.d_map); uint64_t erased = 0, lookedAt = 0; for (auto i = sidx.begin(); i != sidx.end(); lookedAt++) { @@ -207,6 +208,7 @@ template uint64_t pruneMutexCollectionsVect while (toTrim > 0) { for (auto& mc : maps) { const std::lock_guard lock(mc.mutex); + mc.d_cachecachevalid = false; auto& sidx = boost::multi_index::get(mc.d_map); auto i = sidx.begin(); container.preRemoval(*i);