From: Chris Hofstaedtler Date: Fri, 3 Dec 2021 12:45:34 +0000 (+0100) Subject: auth API: purge entire zone from cache, not just zone-level records X-Git-Tag: auth-4.6.0-beta1~4^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bae5ce438fe075e3c0b44083fe9bd1dbc29ea3f;p=thirdparty%2Fpdns.git auth API: purge entire zone from cache, not just zone-level records --- 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." }