From 2e0a4bf9972ba3e1c5e1bf4247eecad70c7c963e Mon Sep 17 00:00:00 2001 From: Spirillen <44526987+spirillen@users.noreply.github.com> Date: Mon, 12 Nov 2018 21:47:12 +0100 Subject: [PATCH] Improve the reading of the time value section Has tried to make this section easier to read by incorporating it into a bulleted list --- pdns/dnsdistdist/docs/guides/cache.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pdns/dnsdistdist/docs/guides/cache.rst b/pdns/dnsdistdist/docs/guides/cache.rst index da913a186..7d6d62733 100644 --- a/pdns/dnsdistdist/docs/guides/cache.rst +++ b/pdns/dnsdistdist/docs/guides/cache.rst @@ -8,10 +8,17 @@ The first step is to define a cache with :func:`newPacketCache`, then to assign pc = newPacketCache(10000, 86400, 0, 60, 60, false) getPool(""):setCache(pc) -The first parameter (10000) is the maximum number of entries stored in the cache, and is the only one required. -All the other parameters are optional and in seconds, except the last one which is a boolean. -The second one (86400) is the maximum lifetime of an entry in the cache, the third one (0) is the minimum TTL an entry should have to be considered for insertion in the cache, the fourth one (60) is the TTL used for a Server Failure or a Refused response. -The fifth one (60) is the TTL that will be used when a stale cache entry is returned. The sixth one is a boolean that when set to true, avoids reducing the TTL of cached entries. + + The first parameter (10000) is the maximum number of entries stored in the cache, and is the only one required. All the other parameters are optional and in seconds, except the last one which is a boolean. + ++ The second one (86400) is the maximum lifetime of an entry in the cache. + ++ The third one (0) is the minimum TTL an entry should have to be considered for insertion in the cache. + ++ The fourth one (60) is the TTL used for a Server Failure or a Refused response. + ++ The fifth one (60) is the TTL that will be used when a stale cache entry is returned. + ++ The sixth one is a boolean that when set to true, avoids reducing the TTL of cached entries. For performance reasons the cache will pre-allocate buckets based on the maximum number of entries, so be careful to set the first parameter to a reasonable value. Something along the lines of a dozen bytes per pre-allocated entry can be expected on 64-bit. -- 2.40.0