Documentation ¶
Index ¶
- type EncapsulatedValue
- type LRU
- func (l *LRU) Get(key interface{}) (value interface{})
- func (l *LRU) GetKeys() (keys []interface{})
- func (l *LRU) GetOrInsert(key interface{}, valFunc func() (val interface{})) (val interface{}, removed []*EncapsulatedValue)
- func (l *LRU) Insert(key interface{}, val interface{}) (removed []*EncapsulatedValue)
- type LimitStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncapsulatedValue ¶
type LRU ¶
type LRU struct {
// contains filtered or unexported fields
}
func New ¶
func New(strategy LimitStrategy, limit int64) *LRU
func (*LRU) GetOrInsert ¶
func (l *LRU) GetOrInsert(key interface{}, valFunc func() (val interface{})) (val interface{}, removed []*EncapsulatedValue)
func (*LRU) Insert ¶
func (l *LRU) Insert(key interface{}, val interface{}) (removed []*EncapsulatedValue)
Click to show internal directories.
Click to hide internal directories.