Skip to content

Commit

Permalink
proxy: imp logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Dec 9, 2022
1 parent 6bc8867 commit 46255f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proxy/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,14 @@ func cacheTTL(m *dns.Msg) (ttl uint32) {
if isCacheableSucceded(m) {
return ttl
}

log.Debug("dnsproxy: cache: not a cacheable noerror response; not caching")
case dns.RcodeNameError:
if isCacheableNegative(m) {
return ttl
}

log.Debug("dnsproxy: cache: not a cacheable nxdomain response; not caching")
case dns.RcodeServerFailure:
return ttl
default:
Expand Down

0 comments on commit 46255f5

Please sign in to comment.