Documentation ¶
Index ¶
- type BaseCache
- func (baseCache *BaseCache) ClearExpireData() bool
- func (baseCache *BaseCache) Count() int
- func (baseCache *BaseCache) Delete(key interface{}) bool
- func (baseCache *BaseCache) Exists(key interface{}) bool
- func (baseCache *BaseCache) Expire(key interface{}, lifeTime time.Duration) bool
- func (baseCache *BaseCache) Flush() bool
- func (baseCache *BaseCache) Get(key interface{}) (interface{}, bool)
- func (baseCache *BaseCache) GetKvStore(key interface{}) (interface{}, bool)
- func (baseCache *BaseCache) GetKvStoreSlice() []*KvStore
- func (baseCache *BaseCache) LoadFromFile(filename string) error
- func (baseCache *BaseCache) LoadIoReader(r io.Reader) error
- func (baseCache *BaseCache) SaveIoWriter(w io.Writer) (err error)
- func (baseCache *BaseCache) SaveToFile(folder, filename string) error
- func (baseCache *BaseCache) Set(key interface{}, value interface{}, lifeTime time.Duration) bool
- type KvStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCache ¶
创建一个缓存库模型
func (*BaseCache) GetKvStore ¶
获取一条内容
func (*BaseCache) LoadFromFile ¶
从文件中读取序列化的数据
func (*BaseCache) LoadIoReader ¶
从io.Reader读取
func (*BaseCache) SaveIoWriter ¶
将缓存数据写入io.Writer中
func (*BaseCache) SaveToFile ¶
将内存数据序列化到文件
Click to show internal directories.
Click to hide internal directories.