memcache

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCache

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

func (*MCache) ClearAll

func (c *MCache) ClearAll() error

FlushAll clear all cached in memcache.

func (*MCache) Decrement

func (c *MCache) Decrement(key string) error

dec decrease counter.

func (*MCache) Delete

func (c *MCache) Delete(key string) error

Delete delete value in memcache.

func (*MCache) Get

func (c *MCache) Get(key string) (interface{}, error)

Get get value from memcache.

func (*MCache) GetJson

func (c *MCache) GetJson(key string, val interface{}) error

Get cached Json value by key.

func (*MCache) Increment

func (c *MCache) Increment(key string) error

inc increase counter.

func (*MCache) Put

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

Set set value to memcache. only support string.

func (*MCache) PutJson

func (c *MCache) PutJson(key string, val interface{}, timeout time.Duration) error

Put Json value with key and expire time

func (*MCache) Touch

func (c *MCache) Touch(key string, timeout time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL