plugin/cache: Set min TTL default to zero (#2199)

* set min ttl default to zero

* add short TTL test case
This commit is contained in:
Chris O'Haver
2018-10-16 09:24:40 -04:00
committed by Yong Tang
parent 8cc8afa96a
commit 4a5641c379
4 changed files with 22 additions and 10 deletions

View File

@@ -239,9 +239,9 @@ func (w *ResponseWriter) Write(buf []byte) (int, error) {
const (
maxTTL = dnsutil.MaximumDefaulTTL
minTTL = dnsutil.MinimalDefaultTTL
minTTL = 0
maxNTTL = dnsutil.MaximumDefaulTTL / 2
minNTTL = dnsutil.MinimalDefaultTTL
minNTTL = 0
defaultCap = 10000 // default capacity of the cache.