Documentation ¶
Index ¶
- type Cacher
- func (c *Cacher) Decr(key string) error
- func (c *Cacher) Delete(key string) error
- func (c *Cacher) Flush() error
- func (c *Cacher) Get(key string) interface{}
- func (c *Cacher) GetEngine() interface{}
- func (c *Cacher) Incr(key string) error
- func (c *Cacher) IsExist(key string) bool
- func (c *Cacher) Put(key string, val interface{}, timeout int64) error
- type CacherType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher struct { Context string Container string Component string // contains filtered or unexported fields }
Cacher type
func NewCacher ¶
func NewCacher(cacherType CacherType, cacherEngine adapter.ICacherEngine) (*Cacher, error)
NewCacher create new Cacher
type CacherType ¶
type CacherType string
CacherType Represent CacherType
const ( MemoryCacher CacherType = "memory" FileCacher CacherType = "file" RedisCacher CacherType = "redis" MemcacheCacher CacherType = "memcache" PGCacher CacherType = "postgres" MyCacher CacherType = "mysql" LedisCacher CacherType = "ledis" NoDBCacher CacherType = "nodb" )
func NewCacherEngine ¶
func NewCacherEngine(cacherType CacherType, ceOptions adapter.CEOptions) (adapter.ICacherEngine, CacherType, error)
NewCacherEngine new Cacher Engine
Click to show internal directories.
Click to hide internal directories.