Documentation ¶
Overview ¶
Package memcache for cache provider
depend on github.com/bradfitz/gomemcache/memcache
go install github.com/bradfitz/gomemcache/memcache
Usage: import(
_ "github.com/astaxie/beego/cache/memcache" "github.com/astaxie/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) StartAndGC ¶ added in v1.6.0
StartAndGC start memcache adapter. config string is like {"conn":"connection info"}. if connecting error, return.
Click to show internal directories.
Click to hide internal directories.