MCPcopy
hub / github.com/nextdns/nextdns / ByteCache

Struct ByteCache

resolver/bytecache.go:12–14  ·  view source on GitHub ↗

ByteCache is a byte-limited cache implementation for DNS responses. It is backed by Ristretto and uses cost in bytes for eviction decisions.

Source from the content-addressed store, hash-verified

10// ByteCache is a byte-limited cache implementation for DNS responses.
11// It is backed by Ristretto and uses cost in bytes for eviction decisions.
12type ByteCache struct {
13 c *ristretto.Cache[uint64, *cacheValue]
14}
15
16// NewByteCache creates a new byte-limited cache with maxCost expressed in bytes.
17// If metrics is false, cache metrics collection is disabled.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected