cache

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("cache key not found")
)

Functions

func Del added in v0.0.4

func Del(k string) error

func Expire added in v0.0.4

func Expire(k string, timeout time.Duration) error

func Get added in v0.0.4

func Get(k string, v interface{}) error

func GetBool added in v0.0.4

func GetBool(k string) (bool, error)

func GetInt added in v0.0.4

func GetInt(k string) (int, error)

func GetInt32 added in v0.0.4

func GetInt32(k string) (int32, error)

func GetInt64 added in v0.0.4

func GetInt64(k string) (int64, error)

func GetStr added in v0.0.4

func GetStr(k string) (string, error)

func GetUint added in v0.0.4

func GetUint(k string) (uint, error)

func GetUint32 added in v0.0.4

func GetUint32(k string) (uint32, error)

func GetUint64 added in v0.0.4

func GetUint64(k string) (uint64, error)

func HIncr added in v0.0.4

func HIncr(key, subKey string) error

func HIncrEx added in v0.0.4

func HIncrEx(key, subKey string, timeout time.Duration) error

func HSet added in v0.0.4

func HSet(key, subKey string, v interface{}) error

func HSetEx added in v0.0.4

func HSetEx(key, subKey string, v interface{}, timeout time.Duration) error

func Incr added in v0.0.4

func Incr(k string) error

func IncrEx added in v0.0.4

func IncrEx(k string, timeout time.Duration) error

func InitCache

func InitCache() (needRun bool, err error)

func Set added in v0.0.4

func Set(k string, v interface{}) error

func SetEx added in v0.0.4

func SetEx(k string, v interface{}, timeout time.Duration) error

Types

type Init added in v0.0.4

type Init struct {
}

func (*Init) Init added in v0.0.4

func (p *Init) Init() (bool, error)

func (*Init) Name added in v0.0.4

func (p *Init) Name() string

func (*Init) WaitFinish added in v0.0.4

func (p *Init) WaitFinish()

Jump to

Keyboard shortcuts

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