Documentation ¶
Index ¶
- type EvictCallback
- type LRU
- func (c *LRU) Add(key, value interface{}) (evicted bool)
- func (c *LRU) Clear()
- func (c *LRU) Contains(key interface{}) (ok bool)
- func (c *LRU) Get(key interface{}) (interface{}, bool)
- func (c *LRU) Keys() []interface{}
- func (c *LRU) Len() int
- func (c *LRU) Remove(key interface{}) (present bool)
- func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRU ¶
type LRU struct {
// contains filtered or unexported fields
}
func (*LRU) RemoveOldest ¶
* *从缓存中删除最老元素
Click to show internal directories.
Click to hide internal directories.