From: Remi Gacogne Date: Thu, 11 Apr 2019 13:38:27 +0000 (+0200) Subject: dnsdist: Update the syntax of newPacketCache() in the caching guide X-Git-Tag: dnsdist-1.4.0-alpha2~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e7471389126eea5041ca6c051fab959e46bbf72;p=thirdparty%2Fpdns.git dnsdist: Update the syntax of newPacketCache() in the caching guide --- diff --git a/pdns/dnsdistdist/docs/guides/cache.rst b/pdns/dnsdistdist/docs/guides/cache.rst index 979ab25d93..167c1503e1 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.