Versions in this module Expand all Collapse all v1 v1.1.5 Jan 29, 2018 Changes in this version + type Config struct + OnEvicted func(key, value interface{}) + Policy EvictionPolicy + ShouldEvict func(size int, key, value interface{}) bool + type Entry struct + Key interface{} + Value interface{} + func (e *Entry) Compare(b llrb.Comparable) int + func (e *Entry) ID() uintptr + func (e *Entry) Range() interval.Range + func (e Entry) String() string + type EvictionPolicy int + const CacheFIFO + const CacheLRU + const CacheNone + type IntervalCache struct + func NewIntervalCache(config Config) *IntervalCache + func (bc *IntervalCache) Add(key, value interface{}) + func (bc *IntervalCache) AddEntry(entry *Entry) + func (bc *IntervalCache) AddEntryAfter(entry, after *Entry) + func (bc *IntervalCache) Clear() + func (bc *IntervalCache) Del(key interface{}) + func (bc *IntervalCache) DelEntry(entry *Entry) + func (bc *IntervalCache) Get(key interface{}) (value interface{}, ok bool) + func (bc *IntervalCache) Len() int + func (bc *IntervalCache) MoveToEnd(entry *Entry) + func (ic *IntervalCache) GetOverlaps(start, end []byte) []*Entry + func (ic *IntervalCache) MakeKey(start, end []byte) IntervalKey + func (ic *IntervalCache) NewKey(start, end []byte) *IntervalKey + type IntervalKey struct + func (ik IntervalKey) String() string + type OrderedCache struct + func NewOrderedCache(config Config) *OrderedCache + func (bc *OrderedCache) Add(key, value interface{}) + func (bc *OrderedCache) AddEntry(entry *Entry) + func (bc *OrderedCache) AddEntryAfter(entry, after *Entry) + func (bc *OrderedCache) Clear() + func (bc *OrderedCache) Del(key interface{}) + func (bc *OrderedCache) DelEntry(entry *Entry) + func (bc *OrderedCache) Get(key interface{}) (value interface{}, ok bool) + func (bc *OrderedCache) Len() int + func (bc *OrderedCache) MoveToEnd(entry *Entry) + func (oc *OrderedCache) Ceil(key interface{}) (interface{}, interface{}, bool) + func (oc *OrderedCache) Do(f func(k, v interface{})) + func (oc *OrderedCache) DoRange(f func(k, v interface{}) bool, from, to interface{}) bool + func (oc *OrderedCache) Floor(key interface{}) (interface{}, interface{}, bool) + type UnorderedCache struct + func NewUnorderedCache(config Config) *UnorderedCache + func (bc *UnorderedCache) Add(key, value interface{}) + func (bc *UnorderedCache) AddEntry(entry *Entry) + func (bc *UnorderedCache) AddEntryAfter(entry, after *Entry) + func (bc *UnorderedCache) Clear() + func (bc *UnorderedCache) Del(key interface{}) + func (bc *UnorderedCache) DelEntry(entry *Entry) + func (bc *UnorderedCache) Get(key interface{}) (value interface{}, ok bool) + func (bc *UnorderedCache) Len() int + func (bc *UnorderedCache) MoveToEnd(entry *Entry)