From: Kees Monshouwer Date: Tue, 18 May 2021 16:44:20 +0000 (+0200) Subject: auth: replace domain-metadata-cache-ttl by zone-metadata-cache-ttl X-Git-Tag: auth-4.5.0-alpha1~6^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b810842e0ad5d962c8a53b3d96dc04befbea59f9;p=thirdparty%2Fpdns.git auth: replace domain-metadata-cache-ttl by zone-metadata-cache-ttl --- diff --git a/docs/settings.rst b/docs/settings.rst index 6d84e346c5..6db781e07a 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -613,8 +613,8 @@ ADDITIONAL section when sending a referral. ``domain-metadata-cache-ttl`` ----------------------------- -- Integer -- Default: 60 +.. deprecated:: 4.5.0 + Renamed to :ref:`setting-zone-metadata-cache-ttl`. Seconds to cache domain metadata from the database. A value of 0 disables caching. @@ -1896,3 +1896,17 @@ means no restriction. Seconds to cache a list of all known zones. A value of 0 will disable the cache. If your backends do not respond to unknown or dynamically generated zones, it is suggested to enable :ref:`setting-consistent-backends` and set this option to `60`. + +.. _setting-zone-metadata-cache-ttl: + +``zone-metadata-cache-ttl`` +----------------------------- + +.. versionchanged:: 4.5.0 + This was called :ref:`setting-domain-metadata-cache-ttl` before 4.5.0. + +- Integer +- Default: 60 + +Seconds to cache zone metadata from the database. A value of 0 +disables caching. diff --git a/docs/upgrading.rst b/docs/upgrading.rst index 6db6861a3b..fa9268a5c9 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -35,6 +35,7 @@ Their old names still work in 4.5.x, but will be removed in the release after it * :ref:`setting-slave-renotify` is now :ref:`setting-secondary-do-renotify` * :ref:`setting-slave` is now :ref:`setting-secondary` * :ref:`setting-superslave` is now :ref:`setting-autosecondary` +* :ref:`setting-domain-metadata-cache-ttl` is now :ref:`setting-zone-metadata-ttl` Changed defaults ~~~~~~~~~~~~~~~~ diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index d6ea575777..3b07d53517 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -187,7 +187,8 @@ void declareArguments() ::arg().set("default-soa-edit","Default SOA-EDIT value")=""; ::arg().set("default-soa-edit-signed","Default SOA-EDIT value for signed zones")=""; ::arg().set("dnssec-key-cache-ttl","Seconds to cache DNSSEC keys from the database")="30"; - ::arg().set("domain-metadata-cache-ttl","Seconds to cache domain metadata from the database")="60"; + ::arg().set("domain-metadata-cache-ttl", "Seconds to cache zone metadata from the database") = "0"; + ::arg().set("zone-metadata-cache-ttl", "Seconds to cache zone metadata from the database") = "60"; ::arg().set("trusted-notification-proxy", "IP address of incoming notification proxy")=""; ::arg().set("slave-renotify", "If we should send out notifications for secondaried updates")="no"; diff --git a/pdns/dbdnsseckeeper.cc b/pdns/dbdnsseckeeper.cc index ebe7bd1b0a..a06846b54b 100644 --- a/pdns/dbdnsseckeeper.cc +++ b/pdns/dbdnsseckeeper.cc @@ -230,7 +230,7 @@ bool DNSSECKeeper::getFromMeta(const DNSName& zname, const std::string& key, std d_metaUpdate=false; } - static int ttl = ::arg().asNum("domain-metadata-cache-ttl"); + static int ttl = ::arg().asNum("zone-metadata-cache-ttl"); if(!((++s_ops) % 100000)) { cleanup(); diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 8c7d47943c..e05ddb3a60 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -135,7 +135,8 @@ static void loadMainConfig(const std::string& configdir) ::arg().set("default-soa-content","Default SOA content")="a.misconfigured.dns.server.invalid hostmaster.@ 0 10800 3600 604800 3600"; ::arg().set("chroot","Switch to this chroot jail")=""; ::arg().set("dnssec-key-cache-ttl","Seconds to cache DNSSEC keys from the database")="30"; - ::arg().set("domain-metadata-cache-ttl","Seconds to cache domain metadata from the database")="60"; + ::arg().set("domain-metadata-cache-ttl", "Seconds to cache zone metadata from the database") = "0"; + ::arg().set("zone-metadata-cache-ttl", "Seconds to cache zone metadata from the database") = "60"; ::arg().set("consistent-backends", "Assume individual domains are not divided over backends. Send only ANY lookup operations to the backend to reduce the number of lookups")="yes"; // Keep this line below all ::arg().set() statements diff --git a/pdns/receiver.cc b/pdns/receiver.cc index 545117eff5..178f1bef80 100644 --- a/pdns/receiver.cc +++ b/pdns/receiver.cc @@ -432,6 +432,8 @@ int main(int argc, char **argv) if (::arg().mustDo("slave-renotify")) ::arg().set("secondary-do-renotify")="yes"; if (::arg().mustDo("superslave")) ::arg().set("autosecondary")="yes"; if (::arg().mustDo("allow-unsigned-supermaster")) ::arg().set("allow-unsigned-autoprimary")="yes"; + if (::arg().asNum("domain-metadata-cache-ttl")) + ::arg().set("zone-metadata-cache-ttl") = ::arg()["domain-metadata-cache-ttl"]; // this mirroring back is on purpose, so that config dumps reflect the actual setting on both names if (::arg().mustDo("primary")) ::arg().set("master")="yes"; @@ -439,6 +441,8 @@ int main(int argc, char **argv) if (::arg().mustDo("secondary-do-renotify")) ::arg().set("slave-renotify")="yes"; if (::arg().mustDo("autosecondary")) ::arg().set("superslave")="yes"; if (::arg().mustDo("allow-unsigned-autoprimary")) ::arg().set("allow-unsigned-supermaster")="yes"; + if (::arg().asNum("zone-metadata-cache-ttl")) + ::arg().set("domain-metadata-cache-ttl") = ::arg()["zone-metadata-cache-ttl"]; g_log.setLoglevel((Logger::Urgency)(::arg().asNum("loglevel"))); g_log.disableSyslog(::arg().mustDo("disable-syslog"));