Lines Matching defs:Cache
15 type Cache struct { struct
16 lru *simplelru.LRU
17 evictedKeys, evictedVals []interface{}
18 onEvictedCB func(k, v interface{})
19 lock sync.RWMutex
42 func (c *Cache) initEvictBuffers() {
49 func (c *Cache) onEvicted(k, v interface{}) {
55 func (c *Cache) Purge() {
73 func (c *Cache) Add(key, value interface{}) (evicted bool) {
89 func (c *Cache) Get(key interface{}) (value interface{}, ok bool) {
98 func (c *Cache) Contains(key interface{}) bool {
107 func (c *Cache) Peek(key interface{}) (value interface{}, ok bool) {
117 func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool) {
139 func (c *Cache) PeekOrAdd(key, value interface{}) (previous interface{}, ok, evicted bool) {
160 func (c *Cache) Remove(key interface{}) (present bool) {
176 func (c *Cache) Resize(size int) (evicted int) {
194 func (c *Cache) RemoveOldest() (key, value interface{}, ok bool) {
210 func (c *Cache) GetOldest() (key, value interface{}, ok bool) {
218 func (c *Cache) Keys() []interface{} {
226 func (c *Cache) Len() int {