From 7bae5ce438fe075e3c0b44083fe9bd1dbc29ea3f Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Fri, 3 Dec 2021 13:45:34 +0100 Subject: [PATCH] auth API: purge entire zone from cache, not just zone-level records --- pdns/ws-auth.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 6d691264d2..5172ac8d69 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -2270,7 +2270,8 @@ static void apiServerCacheFlush(HttpRequest* req, HttpResponse* resp) { DNSName canon = apiNameToDNSName(req->getvars["domain"]); - uint64_t count = purgeAuthCachesExact(canon); + // purge entire zone from cache, not just zone-level records. + uint64_t count = purgeAuthCaches(canon.toString() + "$"); resp->setJsonBody(Json::object { { "count", (int) count }, { "result", "Flushed cache." } -- 2.47.2