aboutsummaryrefslogtreecommitdiff
path: root/plugin/cache/cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/cache/cache.go')
-rw-r--r--plugin/cache/cache.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugin/cache/cache.go b/plugin/cache/cache.go
index 2967e1b34..a8776afac 100644
--- a/plugin/cache/cache.go
+++ b/plugin/cache/cache.go
@@ -171,7 +171,7 @@ func (w *ResponseWriter) set(m *dns.Msg, key int, mt response.Type, duration tim
case response.OtherError:
// don't cache these
default:
- log.Printf("[WARNING] Caching called with unknown typification: %d", mt)
+ log.Printf("[WARNING] Caching called with unknown classification: %d", mt)
}
}
@@ -186,8 +186,9 @@ func (w *ResponseWriter) Write(buf []byte) (int, error) {
}
const (
- maxTTL = 1 * time.Hour
- maxNTTL = 30 * time.Minute
+ maxTTL = 1 * time.Hour
+ maxNTTL = 30 * time.Minute
+ failSafeTTL = 5 * time.Second
defaultCap = 10000 // default capacity of the cache.