Documentation ¶
Overview ¶
Package memcache for cache provider
depend on github.com/bradfitz/gomemcache/memcache
go install github.com/bradfitz/gomemcache/memcache
Usage: import(
_ "tianwei.pro/beego/cache/memcache" "tianwei.pro/beego/cache"
)
bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`) more docs http://beego.me/docs/module/cache.md
Index ¶
- func NewMemCache() cache.Cache
- type Cache
- func (rc *Cache) ClearAll() error
- func (rc *Cache) Decr(key string) error
- func (rc *Cache) Delete(key string) error
- func (rc *Cache) Get(key string) interface{}
- func (rc *Cache) GetMulti(keys []string) []interface{}
- func (rc *Cache) Incr(key string) error
- func (rc *Cache) IsExist(key string) bool
- func (rc *Cache) Put(key string, val interface{}, timeout time.Duration) error
- func (rc *Cache) StartAndGC(config string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶ added in v1.6.0
type Cache struct {
// contains filtered or unexported fields
}
Cache Memcache adapter.
func (*Cache) ClearAll ¶ added in v1.6.0
ClearAll clear all cached in memcache.
func (*Cache) Delete ¶ added in v1.6.0
Delete delete value in memcache.
func (*Cache) Get ¶ added in v1.6.0
Get get value from memcache.
func (*Cache) GetMulti ¶ added in v1.6.0
GetMulti get value from memcache.
func (*Cache) IsExist ¶ added in v1.6.0
IsExist check value exists in memcache.
func (*Cache) Put ¶ added in v1.6.0
Put put value to memcache.
Click to show internal directories.
Click to hide internal directories.