MCPcopy
hub / github.com/AdguardTeam/dnsproxy / canLookUpInCache

Function canLookUpInCache

proxy/cache.go:311–313  ·  view source on GitHub ↗

canLookUpInCache returns true if these parameters could be used to make a cache lookup.

(cache glcache.Cache, req *dns.Msg)

Source from the content-addressed store, hash-verified

309// canLookUpInCache returns true if these parameters could be used to make a
310// cache lookup.
311func canLookUpInCache(cache glcache.Cache, req *dns.Msg) (ok bool) {
312 return cache != nil && req != nil && len(req.Question) == 1
313}
314
315// createCache returns new Cache with the given cacheSize.
316func createCache(cacheSize int) (glc glcache.Cache) {

Callers 2

getMethod · 0.85
getWithSubnetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…