Versions in this module Expand all Collapse all v0 v0.1.0 Mar 25, 2019 Changes in this version + const DvrBoltDB + const DvrBuntDB + const DvrFile + const DvrMemCached + const DvrMemory + const DvrRedis + const FOREVER + const FiveMinutes + const HalfDay + const HalfHour + const OneDay + const OneHour + const OneMinutes + const OneWeek + const TenMinutes + const ThreeDay + const ThreeHour + const ThreeMinutes + const TwoDay + const TwoHour + const TwoMinutes + var Marshal MarshalFunc = json.Marshal + var Unmarshal UnmarshalFunc = json.Unmarshal + func BindStruct(val interface{}, ptr interface{}) error + func Clear() error + func Del(key string) error + func DelMulti(keys []string) error + func Get(key string) interface + func GetMulti(keys []string) map[string]interface + func GobDecode(bts []byte, ptr interface{}) error + func GobEncode(val interface{}) (bs []byte, err error) + func Has(key string) bool + func Set(key string, val interface{}, ttl time.Duration) error + func SetDefName(driverName string) + func SetMulti(mv map[string]interface{}, ttl time.Duration) error + type Cache interface + Clear func() error + Del func(key string) error + DelMulti func(keys []string) error + Get func(key string) interface{} + GetMulti func(keys []string) map[string]interface{} + Has func(key string) bool + Set func(key string, val interface{}, ttl time.Duration) (err error) + SetMulti func(values map[string]interface{}, ttl time.Duration) (err error) + func Default() Cache + func Use(driverName string) Cache + type FileCache struct + func NewFileCache(dir string, pfxAndKey ...string) *FileCache + func (c *FileCache) Clear() error + func (c *FileCache) Del(key string) error + func (c *FileCache) DelMulti(keys []string) error + func (c *FileCache) Get(key string) interface{} + func (c *FileCache) GetFilename(key string) string + func (c *FileCache) GetMulti(keys []string) map[string]interface{} + func (c *FileCache) Has(key string) bool + func (c *FileCache) Set(key string, val interface{}, ttl time.Duration) (err error) + func (c *FileCache) SetMulti(values map[string]interface{}, ttl time.Duration) (err error) + type Item struct + Exp int64 + Val interface{} + type Manager struct + func DefMgr() *Manager + func NewManager() *Manager + func Register(name string, driver Cache) *Manager + func (m *Manager) DefName() string + func (m *Manager) Default() Cache + func (m *Manager) Driver(name string) Cache + func (m *Manager) Get(name string) Cache + func (m *Manager) Register(name string, driver Cache) *Manager + func (m *Manager) SetDefName(driverName string) + func (m *Manager) Use(driverName string) Cache + type MarshalFunc func(v interface{}) ([]byte, error) + type MemoryCache struct + func NewMemoryCache() *MemoryCache + func (c *MemoryCache) Clear() error + func (c *MemoryCache) Count() int + func (c *MemoryCache) Del(key string) error + func (c *MemoryCache) DelMulti(keys []string) error + func (c *MemoryCache) DumpDB(file string) error + func (c *MemoryCache) Get(key string) interface{} + func (c *MemoryCache) GetMulti(keys []string) map[string]interface{} + func (c *MemoryCache) Has(key string) bool + func (c *MemoryCache) Iter(file string) error + func (c *MemoryCache) LastErr() error + func (c *MemoryCache) Restore(file string) error + func (c *MemoryCache) Set(key string, val interface{}, ttl time.Duration) (err error) + func (c *MemoryCache) SetMulti(values map[string]interface{}, ttl time.Duration) (err error) + type UnmarshalFunc func(data []byte, v interface{}) error