Add dns.cache_capacity

This commit is contained in:
世界 2024-11-14 12:42:42 +08:00
parent 9db9484863
commit effcf39469
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
4 changed files with 38 additions and 1 deletions

View file

@ -96,6 +96,7 @@ func NewRouter(ctx context.Context, logFactory log.Factory, options option.Route
DisableCache: dnsOptions.DNSClientOptions.DisableCache,
DisableExpire: dnsOptions.DNSClientOptions.DisableExpire,
IndependentCache: dnsOptions.DNSClientOptions.IndependentCache,
CacheCapacity: dnsOptions.DNSClientOptions.CacheCapacity,
RDRC: func() dns.RDRCStore {
cacheFile := service.FromContext[adapter.CacheFile](ctx)
if cacheFile == nil {