Versions in this module Expand all Collapse all v1 v1.0.0 Mar 3, 2015 Changes in this version + const DefaultExpiration + const NoExpiration + type Cache struct + func New(defaultExpiration, cleanupInterval time.Duration) *Cache + func NewFrom(defaultExpiration, cleanupInterval time.Duration, items map[string]*Item) *Cache + func (c Cache) Add(k string, x interface{}, d time.Duration) error + func (c Cache) Decrement(k string, n int64) error + func (c Cache) DecrementFloat(k string, n float64) error + func (c Cache) DecrementFloat32(k string, n float32) (float32, error) + func (c Cache) DecrementFloat64(k string, n float64) (float64, error) + func (c Cache) DecrementInt(k string, n int) (int, error) + func (c Cache) DecrementInt16(k string, n int16) (int16, error) + func (c Cache) DecrementInt32(k string, n int32) (int32, error) + func (c Cache) DecrementInt64(k string, n int64) (int64, error) + func (c Cache) DecrementInt8(k string, n int8) (int8, error) + func (c Cache) DecrementUint(k string, n uint) (uint, error) + func (c Cache) DecrementUint16(k string, n uint16) (uint16, error) + func (c Cache) DecrementUint32(k string, n uint32) (uint32, error) + func (c Cache) DecrementUint64(k string, n uint64) (uint64, error) + func (c Cache) DecrementUint8(k string, n uint8) (uint8, error) + func (c Cache) DecrementUintptr(k string, n uintptr) (uintptr, error) + func (c Cache) Delete(k string) + func (c Cache) DeleteExpired() + func (c Cache) Flush() + func (c Cache) Get(k string) (interface{}, bool) + func (c Cache) Increment(k string, n int64) error + func (c Cache) IncrementFloat(k string, n float64) error + func (c Cache) IncrementFloat32(k string, n float32) (float32, error) + func (c Cache) IncrementFloat64(k string, n float64) (float64, error) + func (c Cache) IncrementInt(k string, n int) (int, error) + func (c Cache) IncrementInt16(k string, n int16) (int16, error) + func (c Cache) IncrementInt32(k string, n int32) (int32, error) + func (c Cache) IncrementInt64(k string, n int64) (int64, error) + func (c Cache) IncrementInt8(k string, n int8) (int8, error) + func (c Cache) IncrementUint(k string, n uint) (uint, error) + func (c Cache) IncrementUint16(k string, n uint16) (uint16, error) + func (c Cache) IncrementUint32(k string, n uint32) (uint32, error) + func (c Cache) IncrementUint64(k string, n uint64) (uint64, error) + func (c Cache) IncrementUint8(k string, n uint8) (uint8, error) + func (c Cache) IncrementUintptr(k string, n uintptr) (uintptr, error) + func (c Cache) ItemCount() int + func (c Cache) Items() map[string]*Item + func (c Cache) Load(r io.Reader) error + func (c Cache) LoadFile(fname string) error + func (c Cache) Replace(k string, x interface{}, d time.Duration) error + func (c Cache) Save(w io.Writer) (err error) + func (c Cache) SaveFile(fname string) error + func (c Cache) Set(k string, x interface{}, d time.Duration) + type Item struct + Expiration *time.Time + Object interface{} + func (item *Item) Expired() bool Incompatible versions in this module v2.1.1+incompatible Oct 4, 2019 v2.1.0+incompatible Jul 22, 2017 v2.0.0+incompatible Jan 27, 2016