memcache

package
v2.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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