From 4cda5b6e8f5d4eb2f3e4ef1828850994dbae9442 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 6 Dec 2019 14:49:36 +0100 Subject: [PATCH] Also invalidate cachecache on prune --- pdns/cachecleaner.hh | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5