Versions in this module Expand all Collapse all v0 v0.7.0 Jun 19, 2020 Changes in this version + type Cache interface + Clear func() error + GetItem func(key string) (interface{}, error) + Length func() (uint, error) + RemoveItem func(key string) error + SetItem func(key string, value interface{}, exp time.Duration) error + type Mem struct + func NewMemoryCache() Mem + func (m Mem) Clear() error + func (m Mem) GetItem(key string) (interface{}, error) + func (m Mem) Length() (uint, error) + func (m Mem) RemoveItem(key string) error + func (m Mem) SetItem(key string, value interface{}, exp time.Duration) error + type Redis struct + func NewRedisCache(addr string, password string) Redis + func (m Redis) Clear() error + func (m Redis) GetItem(key string) (interface{}, error) + func (m Redis) Length() (uint, error) + func (m Redis) RemoveItem(key string) error + func (m Redis) SetItem(key string, value interface{}, exp time.Duration) error