Versions in this module Expand all Collapse all v0 v0.1.0 Aug 4, 2016 Changes in this version + type Cache interface + Get func(key string) (value interface{}, status Result) + Put func(key string, value interface{}, ttl time.Duration) + Size func() int + func NOOPCache() Cache + func New(maxSize int) Cache + func WriteOnly(c Cache) Cache + type LRUCache struct + func NewLRUCache(size int) (*LRUCache, error) + func (c *LRUCache) Add(key, value interface{}) + func (c *LRUCache) Get(key interface{}) (value interface{}, ok bool) + func (c *LRUCache) Len() int + func (c *LRUCache) Purge() + func (c *LRUCache) Remove(key interface{}) + func (c *LRUCache) RemoveOldest() + type Result string + const NotFound + const OK + const Stale