cache

package
v0.0.0-...-9f6fd05 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(b interface{}, v interface{}) error

Unmarshal value from memcache.

Types

type PackMemcacheCache

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

func NewPackMemCache

func NewPackMemCache() *PackMemcacheCache

create new memcache adapter.

func (*PackMemcacheCache) ClearAll

func (rc *PackMemcacheCache) ClearAll() error

clear all cached in memcache.

func (*PackMemcacheCache) Decr

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

decrease counter.

func (*PackMemcacheCache) Delete

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

delete value in memcache.

func (*PackMemcacheCache) Get

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

get value from memcache.

func (*PackMemcacheCache) Incr

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

increase counter.

func (*PackMemcacheCache) IsExist

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

check value exists in memcache.

func (*PackMemcacheCache) Put

func (rc *PackMemcacheCache) Put(key string, val interface{}, timeout int64) error

put value to memcache.

func (*PackMemcacheCache) StartAndGC

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

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

Jump to

Keyboard shortcuts

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