Skip to content

Commit 98ec132

Browse files
committed
Pull request #413: AGDNS-3379-add-defaults-to-lib
Merge in GO/dnsproxy from AGDNS-3379-add-defaults-to-lib to master Squashed commit of the following: commit aef424b Author: f.setrakov <[email protected]> Date: Mon Nov 24 16:24:44 2025 +0300 proxy: set default optimistic cache settings
1 parent 53af60f commit 98ec132

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

proxy/proxy.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ func New(c *Config) (p *Proxy, err error) {
274274
p.bindRetryIvl = bindRetries.Interval
275275
}
276276

277+
p.CacheOptimisticAnswerTTL = cmp.Or(p.CacheOptimisticAnswerTTL, DefaultOptimisticAnswerTTL)
278+
p.CacheOptimisticMaxAge = cmp.Or(p.CacheOptimisticMaxAge, DefaultOptimisticMaxAge)
279+
277280
err = p.setupDNS64()
278281
if err != nil {
279282
return nil, fmt.Errorf("setting up DNS64: %w", err)

0 commit comments

Comments
 (0)