Documentation
¶
Overview ¶
Package cache implements a cache.
Index ¶
Constants ¶
View Source
const ( // Success is the class for caching positive caching. Success = "success" // Denial is the class defined for negative caching. Denial = "denial" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { *CacheBackend // contains filtered or unexported fields }
type CacheBackend ¶
type CacheBackend struct { Next plugin.Handler Zones []string // contains filtered or unexported fields }
Cache is a plugin that looks up responses in a cache and caches replies. It has a success and a denial of existence cache.
func NewBackend ¶
func NewBackend() *CacheBackend
New returns an initialized Cache with default settings. It's up to the caller to set the Next handler.
type ResponseWriter ¶
type ResponseWriter struct { dns.ResponseWriter *Cache // contains filtered or unexported fields }
ResponseWriter is a response writer that caches the reply message.
func (*ResponseWriter) RemoteAddr ¶
func (w *ResponseWriter) RemoteAddr() net.Addr
RemoteAddr implements the dns.ResponseWriter interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.