Documentation ¶
Index ¶
- Variables
- func Register(name string, driver IFactoryCache)
- func ToStruct(in, out interface{}) error
- type CacheConfigSt
- type CacheItemSt
- type Cacher
- type ErrNotExists
- type FactoryFileCache
- type FactoryMemoryCache
- type FactoryRedisCache
- type FileCacheSt
- func (self *FileCacheSt) Clear()
- func (self *FileCacheSt) Close()
- func (self *FileCacheSt) Del(keys ...string) bool
- func (self *FileCacheSt) Get(key string) interface{}
- func (self *FileCacheSt) GetStruct(key string, out interface{}) error
- func (self *FileCacheSt) Set(key string, data interface{}, expire int64) bool
- type IFactoryCache
- type MemoryCacheSt
- func (self *MemoryCacheSt) Clear()
- func (self *MemoryCacheSt) Close()
- func (self *MemoryCacheSt) Del(keys ...string) bool
- func (self *MemoryCacheSt) GC()
- func (self *MemoryCacheSt) Get(key string) interface{}
- func (self *MemoryCacheSt) GetStruct(key string, out interface{}) error
- func (self *MemoryCacheSt) Set(key string, data interface{}, expire int64) bool
- type RedisCacheSt
- func (self *RedisCacheSt) Clear()
- func (self *RedisCacheSt) Close()
- func (self *RedisCacheSt) Del(keys ...string) bool
- func (self *RedisCacheSt) Get(key string) interface{}
- func (self *RedisCacheSt) GetStruct(key string, out interface{}) error
- func (self *RedisCacheSt) Set(key string, data interface{}, expire int64) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var GFileCacheDir = ""
Functions ¶
Types ¶
type CacheConfigSt ¶
type CacheItemSt ¶
type CacheItemSt struct { Expire int64 `json:"expire" bson:"expire"` Data interface{} `json:"data" bson:"data"` }
type Cacher ¶
type ErrNotExists ¶
type ErrNotExists struct { }
func (ErrNotExists) Error ¶
func (e ErrNotExists) Error() string
type FactoryFileCache ¶
type FactoryFileCache struct { }
func (*FactoryFileCache) Open ¶
func (factory *FactoryFileCache) Open(params interface{}) Cacher
获取缓存日志配置信息
type FactoryMemoryCache ¶
type FactoryMemoryCache struct { }
func (*FactoryMemoryCache) Open ¶
func (factory *FactoryMemoryCache) Open(params interface{}) Cacher
type FactoryRedisCache ¶
type FactoryRedisCache struct { }
func (*FactoryRedisCache) Open ¶
func (factory *FactoryRedisCache) Open(params interface{}) Cacher
type FileCacheSt ¶
type FileCacheSt struct {
// contains filtered or unexported fields
}
func (*FileCacheSt) GetStruct ¶
func (self *FileCacheSt) GetStruct(key string, out interface{}) error
直接获取数据并解析到结构当中
type IFactoryCache ¶
type IFactoryCache interface {
Open(params interface{}) Cacher
}
type MemoryCacheSt ¶
type MemoryCacheSt struct {
// contains filtered or unexported fields
}
func (*MemoryCacheSt) Get ¶
func (self *MemoryCacheSt) Get(key string) interface{}
获取一个缓存记录信息,过期记录不返回
func (*MemoryCacheSt) GetStruct ¶
func (self *MemoryCacheSt) GetStruct(key string, out interface{}) error
直接获取数据并解析到结构当中
type RedisCacheSt ¶
type RedisCacheSt struct {
// contains filtered or unexported fields
}
func (*RedisCacheSt) GetStruct ¶
func (self *RedisCacheSt) GetStruct(key string, out interface{}) error
直接获取数据并解析到结构当中
Click to show internal directories.
Click to hide internal directories.