Versions in this module Expand all Collapse all v1 v1.4.0 Nov 21, 2020 v1.3.1 Nov 29, 2019 Changes in this version + var ErrCacheMiss = errors.New("cache: miss") + var ErrNotStored = errors.New("cache: not stored") + var Null = &nullCache + type Cache interface + Add func(k string, v interface{}, expire time.Duration) error + Dec func(k string, v uint64) (int64, error) + Delete func(k string) error + Get func(k string) Item + GetMulti func(ks ...string) ([]Item, error) + Inc func(k string, v uint64) (int64, error) + Replace func(k string, v interface{}, expire time.Duration) error + Set func(k string, v interface{}, expire time.Duration) error + type Decoder interface + Bool func(interface{}) (bool, error) + Bytes func(interface{}) ([]byte, error) + Float64 func(interface{}) (float64, error) + Int64 func(interface{}) (int64, error) + String func(interface{}) (string, error) + Uint64 func(interface{}) (uint64, error) + type Item struct + Err error + Value interface{} + func NewItem(d Decoder, v interface{}, err error) Item + func (i Item) Bool() (bool, error) + func (i Item) Bytes() ([]byte, error) + func (i Item) Float64() (float64, error) + func (i Item) Int64() (int64, error) + func (i Item) String() (string, error) + func (i Item) Uint64() (uint64, error)