Documentation ¶
Index ¶
- type KeyLRU
- func (lru *KeyLRU) Add(key interface{}) error
- func (lru *KeyLRU) AddOrUpdate(key interface{}) error
- func (lru *KeyLRU) Find(key interface{}) (interface{}, bool)
- func (lru *KeyLRU) Keys() []interface{}
- func (lru *KeyLRU) Len() int
- func (lru *KeyLRU) Peek(key interface{}) (interface{}, bool)
- func (lru *KeyLRU) Remove(key interface{}) interface{}
- func (lru *KeyLRU) RemoveOldest() interface{}
- type LRU
- func (lru *LRU) Add(key interface{}, value interface{}) error
- func (lru *LRU) AddOrUpdate(key interface{}, value interface{}) error
- func (lru *LRU) AddPair(pair Pair) error
- func (lru *LRU) Find(key interface{}) (interface{}, bool)
- func (lru *LRU) Keys() []interface{}
- func (lru *LRU) Len() int
- func (lru *LRU) Pairs() []Pair
- func (lru *LRU) Peek(key interface{}) (interface{}, bool)
- func (lru *LRU) Remove(key interface{}) interface{}
- func (lru *LRU) RemoveOldest() interface{}
- func (lru *LRU) Values() []interface{}
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyLRU ¶
type KeyLRU struct {
// contains filtered or unexported fields
}
LRU takes advantage of list's sequence and map's efficient locate
func (*KeyLRU) AddOrUpdate ¶
func (*KeyLRU) Remove ¶
func (lru *KeyLRU) Remove(key interface{}) interface{}
Remove removes Key from cl.
func (*KeyLRU) RemoveOldest ¶
func (lru *KeyLRU) RemoveOldest() interface{}
type LRU ¶
type LRU struct {
// contains filtered or unexported fields
}
LRU takes advantage of list's sequence and map's efficient locate
func (*LRU) AddOrUpdate ¶
func (*LRU) Remove ¶
func (lru *LRU) Remove(key interface{}) interface{}
Remove removes Key from cl.
func (*LRU) RemoveOldest ¶
func (lru *LRU) RemoveOldest() interface{}
Click to show internal directories.
Click to hide internal directories.