Documentation ¶
Index ¶
- type EvictCallback
- type LRU
- func (c *LRU) Add(s utils.Service) bool
- func (c *LRU) Containkey(key interface{}) (ok bool)
- func (c *LRU) Contains(key interface{}, rt string) (ok bool)
- func (c *LRU) Get(s utils.Service) ([]utils.Entry, error)
- func (c *LRU) Keys() []interface{}
- func (c *LRU) Len() int
- func (c *LRU) List() []utils.Service
- func (c *LRU) Purge()
- func (c *LRU) Remove(s utils.Service) error
- func (c *LRU) RemoveOldest()
- func (c *LRU) Set(originalValue utils.Service, modifyValue utils.Service) error
- 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) Containkey ¶
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.