cacheForContext returns cache object for the given context.
(d *DNSContext)
| 7 | |
| 8 | // cacheForContext returns cache object for the given context. |
| 9 | func (p *Proxy) cacheForContext(d *DNSContext) (c *cache) { |
| 10 | if d.CustomUpstreamConfig != nil && d.CustomUpstreamConfig.cache != nil { |
| 11 | return d.CustomUpstreamConfig.cache |
| 12 | } |
| 13 | |
| 14 | return p.cache |
| 15 | } |
| 16 | |
| 17 | // replyFromCache tries to get the response from general or subnet cache. In |
| 18 | // case the cache is present in d, it's used first. Returns true on success. |
no outgoing calls
no test coverage detected