Versions in this module Expand all Collapse all v0 v0.0.2 Oct 10, 2020 Changes in this version + var DefaultEvery = 60 + var DefaultMaxSize = 10 + func GetBool(v interface{}) bool + func GetFloat64(v interface{}) float64 + func GetInt(v interface{}) int + func GetInt64(v interface{}) int64 + func GetString(v interface{}) string + func Register(name string, adapter Instance) + type Cache interface + ClearAll func() error + Decr func(key string) error + Delete func(key string) error + Get func(key string) interface{} + GetAllKeys func() []string + GetMulti func(keys []string) []interface{} + Incr func(key string) error + IsExist func(key string) bool + Put func(key string, val interface{}, timeout time.Duration) error + Size func() int + StartAndGC func(config string) error + Vacuum func() + func NewCache(adapterName, config string) (adapter Cache, err error) + func NewMemoryCache() Cache + type Instance func() Cache + type MemoryCache struct + Every int + func (bc *MemoryCache) ClearAll() error + func (bc *MemoryCache) Decr(key string) error + func (bc *MemoryCache) Delete(name string) error + func (bc *MemoryCache) Get(name string) interface{} + func (bc *MemoryCache) GetAllKeys() []string + func (bc *MemoryCache) GetMulti(names []string) []interface{} + func (bc *MemoryCache) Incr(key string) error + func (bc *MemoryCache) IsExist(name string) bool + func (bc *MemoryCache) Put(name string, value interface{}, lifespan time.Duration) error + func (bc *MemoryCache) Size() int + func (bc *MemoryCache) StartAndGC(config string) error + func (bc *MemoryCache) Vacuum() + type MemoryItem struct