Versions in this module Expand all Collapse all v0 v0.0.1 Jan 25, 2016 Changes in this version + type Cache struct + func New(size int) (*Cache, error) + func NewWithEvict(size int, onEvicted func(key interface{}, value interface{})) (*Cache, error) + func (c *Cache) Add(key, value interface{}) bool + func (c *Cache) Contains(key interface{}) (ok bool) + func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evict bool) + func (c *Cache) Get(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{}) + func (c *Cache) RemoveOldest()