]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Update the syntax of newPacketCache() in the caching guide 7715/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 11 Apr 2019 13:38:27 +0000 (15:38 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 11 Apr 2019 13:38:27 +0000 (15:38 +0200)
pdns/dnsdistdist/docs/guides/cache.rst

index 979ab25d93db348adbbbd164578eb0e32dc379b4..167c1503e13c42267ee8762c18740e50d3980fc2 100644 (file)
@@ -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.