beego: github.com/astaxie/beego/cache/memcache Index | Files

package memcache

import "github.com/astaxie/beego/cache/memcache"

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

Package Files

memcache.go

func NewMemCache Uses

func NewMemCache() cache.Cache

NewMemCache create new memcache adapter.

type Cache Uses

type Cache struct {
    // contains filtered or unexported fields
}

Cache Memcache adapter.

func (*Cache) ClearAll Uses

func (rc *Cache) ClearAll() error

ClearAll clear all cached in memcache.

func (*Cache) Decr Uses

func (rc *Cache) Decr(key string) error

Decr decrease counter.

func (*Cache) Delete Uses

func (rc *Cache) Delete(key string) error

Delete delete value in memcache.

func (*Cache) Get Uses

func (rc *Cache) Get(key string) interface{}

Get get value from memcache.

func (*Cache) GetMulti Uses

func (rc *Cache) GetMulti(keys []string) []interface{}

GetMulti get value from memcache.

func (*Cache) Incr Uses

func (rc *Cache) Incr(key string) error

Incr increase counter.

func (*Cache) IsExist Uses

func (rc *Cache) IsExist(key string) bool

IsExist check value exists in memcache.

func (*Cache) Put Uses

func (rc *Cache) Put(key string, val interface{}, timeout time.Duration) error

Put put value to memcache.

func (*Cache) StartAndGC Uses

func (rc *Cache) StartAndGC(config string) error

StartAndGC start memcache adapter. config string is like {"conn":"connection info"}. if connecting error, return.

Package memcache imports 6 packages (graph) and is imported by 17 packages. Updated 2019-02-11. Refresh now. Tools for package owners.