MCPcopy
hub / github.com/silenceper/wechat / IsExist

Method IsExist

cache/memcache.go:36–41  ·  view source on GitHub ↗

IsExist check value exists in memcache.

(key string)

Source from the content-addressed store, hash-verified

34
35// IsExist check value exists in memcache.
36func (mem *Memcache) IsExist(key string) bool {
37 if _, err := mem.conn.Get(key); err != nil {
38 return false
39 }
40 return true
41}
42
43// Set cached value with key and expire time.
44func (mem *Memcache) Set(key string, val interface{}, timeout time.Duration) (err error) {

Callers 1

TestMemcacheFunction · 0.95

Calls 1

GetMethod · 0.65

Tested by 1

TestMemcacheFunction · 0.76