From 3e7471389126eea5041ca6c051fab959e46bbf72 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 11 Apr 2019 15:38:27 +0200 Subject: [PATCH] dnsdist: Update the syntax of newPacketCache() in the caching guide --- pdns/dnsdistdist/docs/guides/cache.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/docs/guides/cache.rst b/pdns/dnsdistdist/docs/guides/cache.rst index 979ab25d9..167c1503e 100644 --- a/pdns/dnsdistdist/docs/guides/cache.rst +++ b/pdns/dnsdistdist/docs/guides/cache.rst @@ -5,7 +5,7 @@ Caching Responses It is enabled per-pool, but the same cache can be shared between several pools. The first step is to define a cache with :func:`newPacketCache`, then to assign that cache to the chosen pool, the default one being represented by the empty string:: - pc = newPacketCache(10000, 86400, 0, 60, 60, false) + pc = newPacketCache(10000, {maxTTL=86400, minTTL=0, temporaryFailureTTL=60, staleTTL=60, dontAge=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. -- 2.40.0