Documentation ¶
Index ¶
- type EvictCallback
- type LRU
- func (c *LRU) Add(s []dns.RR, rrtype uint16) bool
- func (c *LRU) Contains(key interface{}) (ok bool)
- func (c *LRU) Get(name string, rtype uint16) ([]dns.RR, *time.Time, error)
- func (c *LRU) Keys() []interface{}
- func (c *LRU) Len() int
- func (c *LRU) Purge()
- func (c *LRU) Remove(name string, rtype uint16) error
- func (c *LRU) RemoveOldest()
- type Record
- type Records
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvictCallback ¶
type LRU ¶
type LRU struct {
// contains filtered or unexported fields
}
func (*LRU) Contains ¶
Check if a key is in the cache, without updating the recent-ness or deleting it for being stale.
func (*LRU) Keys ¶
func (c *LRU) Keys() []interface{}
Keys returns a slice of the keys in the cache, from oldest to newest.
func (*LRU) RemoveOldest ¶
func (c *LRU) RemoveOldest()
RemoveOldest removes the oldest item from the cache.
Click to show internal directories.
Click to hide internal directories.