Versions in this module Expand all Collapse all v1 v1.0.1 Dec 26, 2014 Changes in this version + var FETCH_TIME_LIMIT = time.Second * 5 + var GRACE_LIMIT = time.Second * 20 + var REAPER_FREQUENCY = time.Minute * 5 + var REAPER_LIMIT = 1000 + type Cache struct + func New(fetcher Fetcher, ttl time.Duration) *Cache + func (c *Cache) Clear() + func (c *Cache) Delete(key string) + func (c *Cache) Get(key string) interface{} + func (c *Cache) Replace(key string, value interface{}) + func (c *Cache) Set(key string, value interface{}) + type Fetcher func(key string) interface + type IntCache struct + func NewInt(fetcher IntFetcher, ttl time.Duration) *IntCache + func (c *IntCache) Clear() + func (c *IntCache) Delete(key int) + func (c *IntCache) Get(key int) interface{} + func (c *IntCache) Replace(key int, value interface{}) + func (c *IntCache) Set(key int, value interface{}) + type IntFetcher func(key int) interface + type Item struct + func (i *Item) State() state