Having no cache makes no sense and anything below a few seconds will
lead to SERVFAILs on recursors that have a low query load.
Closes #4634
Maximum number of seconds to cache an item in the DNS cache, no matter what the
original TTL specified.
+Since PowerDNS Recursor 4.1.0, the minimum value of this setting is 15.
+i.e. setting this to lower than 15 will make this value 15.
## `max-mthreads`
* Integer
SyncRes::s_nopacketcache = ::arg().mustDo("disable-packetcache");
SyncRes::s_maxnegttl=::arg().asNum("max-negative-ttl");
- SyncRes::s_maxcachettl=::arg().asNum("max-cache-ttl");
+ SyncRes::s_maxcachettl=max(::arg().asNum("max-cache-ttl"), 15);
SyncRes::s_packetcachettl=::arg().asNum("packetcache-ttl");
// Cap the packetcache-servfail-ttl to the packetcache-ttl
uint32_t packetCacheServFailTTL = ::arg().asNum("packetcache-servfail-ttl");