Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Add(key, value interface{}) (evicted bool)
- func (c *Cache) Contains(key interface{}) (ok bool)
- func (c *Cache) ForEach(callback func(value interface{}))
- func (c *Cache) Get(key interface{}) (value interface{}, ok bool)
- func (c *Cache) GetOldest() (key interface{}, value interface{}, ok bool)
- func (c *Cache) Keys() []interface{}
- func (c *Cache) Len() int
- func (c *Cache) Peek(key interface{}) (value interface{}, ok bool)
- func (c *Cache) Purge()
- func (c *Cache) Remove(key interface{}) (present bool)
- func (c *Cache) RemoveOldest() (key interface{}, value interface{}, ok bool)
- func (c *Cache) RemoveWithoutCallback(key interface{}) (present bool)
- type EvictCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) RemoveOldest ¶
func (*Cache) RemoveWithoutCallback ¶
type EvictCallback ¶
type EvictCallback func(key interface{}, value interface{})
Click to show internal directories.
Click to hide internal directories.