Documentation ¶
Index ¶
- Variables
- func Forget(key string) error
- func Get(key string, ret interface{}) (bool, error)
- func Has(key string) (bool, error)
- func Init(conf []Config, defaultAdapter string) error
- func Remember(key string, value func() (interface{}, error), ttl int64, ret interface{}) (bool, error)
- func Set(key string, value interface{}, ttl int64) error
- type Cache
- type Config
- type Manager
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidRedisAdapterParams = errors.New("无效的redis适配器参数") ErrInvalidMemcacheAdapterParams = errors.New("无效的memcache适配器参数") ErrInvalidLruAdapterParams = errors.New("无效的LRU适配器参数") ErrInvalidDefaultName = errors.New("无效的默认实例") ErrAdapterNotFound = errors.New("找不到适配器") ErrAdapterUninitialized = errors.New("适配器未初始化") ErrEmptyKey = errors.New("key不存在或已过期") )
Functions ¶
Types ¶
type Cache ¶
Click to show internal directories.
Click to hide internal directories.