Versions in this module Expand all Collapse all v0 v0.0.2 Jan 4, 2020 v0.0.1 Jan 1, 2020 Changes in this version + func Delete(key string) (suc bool) + func GC() + func Get(key string) (has bool, data []byte) + func Set(key string, val []byte, life int64) (suc bool) + func SetDefaultCacheHandler(cache Cache) + type Cache interface + Delete func(key string) (suc bool) + DeleteAll func() (suc bool) + GC func() + Get func(key string) (has bool, data []byte) + Set func(key string, val []byte, life int64) (suc bool) + StartGcTimer func(sec int64) + type Data struct + CreateTime int64 + Data []byte + Key string + Life int64 + type FileCache struct + func NewFileCache(data_dir string) *FileCache + func (cache *FileCache) Delete(key string) bool + func (cache *FileCache) DeleteAll() bool + func (cache *FileCache) GC() + func (cache *FileCache) Get(key string) (has bool, data []byte) + func (cache *FileCache) Set(key string, data []byte, life int64) (suc bool) + func (cache *FileCache) StartGcTimer(sec int64) + type NoneCache struct + func NewNoneCache() *NoneCache + func (cache *NoneCache) Delete(key string) (suc bool) + func (cache *NoneCache) DeleteAll() (suc bool) + func (cache *NoneCache) GC() + func (cache *NoneCache) Get(key string) (has bool, data []byte) + func (cache *NoneCache) Set(key string, val []byte, life int64) bool + func (cache *NoneCache) StartGcTimer(sec int64)