From: Vladimír Čunát Date: Thu, 29 Mar 2018 11:13:44 +0000 (+0200) Subject: document cache.ns_tout X-Git-Tag: v2.3.0~22^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de77589005b1b380cf9c72fe380b9470133daf54;p=thirdparty%2Fknot-resolver.git document cache.ns_tout --- diff --git a/daemon/README.rst b/daemon/README.rst index 07c8f6a9e..545e0fa18 100644 --- a/daemon/README.rst +++ b/daemon/README.rst @@ -756,6 +756,16 @@ daemons or manipulated from other processes, making for example synchronised loa cache.min_ttl(5) 5 +.. function:: cache.ns_tout([timeout]) + + :param timeout: number of milliseconds (default: :c:macro:`KR_NS_TIMEOUT_RETRY_INTERVAL`) + :return: current timeout + + Get or set time interval for which a nameserver address will be ignored after determining that it doesn't return (useful) answers. + The intention is to avoid waiting if there's little hope; instead, kresd can immediately SERVFAIL or immediately use stale records (with ``serve_stale`` module). + + .. warning:: This settings applies only to the current kresd process. + .. function:: cache.prune([max_count]) :param number max_count: maximum number of items to be pruned at once (default: 65536) diff --git a/lib/nsrep.h b/lib/nsrep.h index 36dc6e8d2..36aea3a64 100644 --- a/lib/nsrep.h +++ b/lib/nsrep.h @@ -45,8 +45,8 @@ enum kr_ns_score { */ #define KR_NS_DEAD (((KR_NS_TIMEOUT * 4) + 3) / 3) -/* If once NS was marked as "timeouted", it won't participate in NS elections - * at least KR_NS_TIMEOUT_RETRY_INTERVAL milliseconds. */ +/** If once NS was marked as "timeouted", it won't participate in NS elections + * at least KR_NS_TIMEOUT_RETRY_INTERVAL milliseconds (now: one minute). */ #define KR_NS_TIMEOUT_RETRY_INTERVAL 60000 /**