gomacaron

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigParser

func ConfigParser(conf interface{}) cache.Options

ConfigParser config parser for gomacaron

func NewCacher

func NewCacher(adapter string, options cache.Options) (adapter.ICacherEngine, error)

NewCacher new GoMacaron Cacher

Types

type Cacher

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

Cacher represent GoMacaron Cacher

func (*Cacher) Decr

func (c *Cacher) Decr(key string) error

Decr Decrement key value

func (*Cacher) Delete

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

Delete delete existing key value

func (*Cacher) Flush

func (c *Cacher) Flush() error

Flush deletes all cached data

func (*Cacher) Get

func (c *Cacher) Get(key string) interface{}

Get key value

func (*Cacher) GetEngine

func (c *Cacher) GetEngine() interface{}

GetEngine get default Engine

func (*Cacher) Incr

func (c *Cacher) Incr(key string) error

Incr increment key value

func (*Cacher) IsExist

func (c *Cacher) IsExist(key string) bool

IsExist check if key is exist

func (*Cacher) Put

func (c *Cacher) Put(key string, val interface{}, timeout int64) error

Put put key value with timeout

Jump to

Keyboard shortcuts

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