ByteCache is a byte-limited cache implementation for DNS responses. It is backed by Ristretto and uses cost in bytes for eviction decisions.
| 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. |
| 12 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected