Versions in this module Expand all Collapse all v1 v1.0.1 Jan 7, 2015 v1.0.0 Nov 21, 2014 Changes in this version + var NilTracked = new(nilItem) + type Cache struct + func New(config *Configuration) *Cache + func (c *Cache) Clear() + func (c *Cache) Delete(key string) bool + func (c *Cache) Fetch(key string, duration time.Duration, fetch func() (interface{}, error)) (interface{}, error) + func (c *Cache) Get(key string) *Item + func (c *Cache) Replace(key string, value interface{}) bool + func (c *Cache) Set(key string, value interface{}, duration time.Duration) + func (c *Cache) TrackingGet(key string) TrackedItem + type Configuration struct + func Configure() *Configuration + func (c *Configuration) Buckets(count uint32) *Configuration + func (c *Configuration) DeleteBuffer(size uint32) *Configuration + func (c *Configuration) GetsPerPromote(count int32) *Configuration + func (c *Configuration) ItemsToPrune(count uint32) *Configuration + func (c *Configuration) MaxSize(max int64) *Configuration + func (c *Configuration) PromoteBuffer(size uint32) *Configuration + func (c *Configuration) Track() *Configuration + type Item struct + func (i *Item) Expired() bool + func (i *Item) Expires() time.Time + func (i *Item) Extend(duration time.Duration) + func (i *Item) Release() + func (i *Item) TTL() time.Duration + func (i *Item) Value() interface{} + type LayeredCache struct + func Layered(config *Configuration) *LayeredCache + func (c *LayeredCache) Clear() + func (c *LayeredCache) Delete(primary, secondary string) bool + func (c *LayeredCache) DeleteAll(primary string) bool + func (c *LayeredCache) Fetch(primary, secondary string, duration time.Duration, ...) (interface{}, error) + func (c *LayeredCache) Get(primary, secondary string) *Item + func (c *LayeredCache) Replace(primary, secondary string, value interface{}) bool + func (c *LayeredCache) Set(primary, secondary string, value interface{}, duration time.Duration) + func (c *LayeredCache) TrackingGet(primary, secondary string) TrackedItem + type Sized interface + Size func() int64 + type TrackedItem interface + Expired func() bool + Expires func() time.Time + Extend func(duration time.Duration) + Release func() + TTL func() time.Duration + Value func() interface{} Incompatible versions in this module v2.0.2+incompatible Nov 3, 2016 v2.0.1+incompatible Nov 2, 2016 v2.0.0+incompatible Feb 5, 2016