Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Key ¶
Key uses the name, type and rdata, which is serialized and then hashed as the key for the lookup.
Types ¶
type Cache ¶
Cache is a LRU cache that holds on the a number of RRs or DNS messgas.
func New ¶
New returns a new cache with the capacity and the ttl specified.
func (*Cache) Capacity ¶ added in v1.0.2
Capacity returns the capacity of the cache as an int.
func (*Cache) InsertMessage ¶
InsertMessage inserts a message in the Cache. We will cache it for ttl seconds, which should be a small (60...300) integer.
func (*Cache) InsertSignature ¶
InsertSignature inserts a signature, the expiration time is used as the cache ttl.
func (*Cache) Remove ¶
Remove removes the element under key s from the cache.
func (*Cache) Search ¶
Search returns .... and a boolean indicating if we found something in the cache.
Click to show internal directories.
Click to hide internal directories.