From de77589005b1b380cf9c72fe380b9470133daf54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 29 Mar 2018 13:13:44 +0200 Subject: [PATCH] document cache.ns_tout --- daemon/README.rst | 10 ++++++++++ lib/nsrep.h | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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 /** -- 2.47.2