refactor(cache): modernize with generics (#7842)

This commit is contained in:
vflaux
2026-02-04 02:23:53 +01:00
committed by GitHub
parent 923a8b5d2b
commit 30c20b52ff
13 changed files with 70 additions and 68 deletions

View File

@@ -12,6 +12,8 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/cache"
clog "github.com/coredns/coredns/plugin/pkg/log"
"github.com/miekg/dns"
)
var log = clog.NewWithPlugin("dnssec")
@@ -24,7 +26,7 @@ func setup(c *caddy.Controller) error {
return plugin.Error("dnssec", err)
}
ca := cache.New(capacity)
ca := cache.New[[]dns.RR](capacity)
stop := make(chan struct{})
c.OnShutdown(func() error {