IsExist check value exists in memcache.
(key string)
| 34 | |
| 35 | // IsExist check value exists in memcache. |
| 36 | func (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. |
| 44 | func (mem *Memcache) Set(key string, val interface{}, timeout time.Duration) (err error) { |