cache

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Del

func Del(k string) error

func Expire

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

func Get

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

func GetBool

func GetBool(k string) (bool, error)

func GetInt

func GetInt(k string) (int, error)

func GetInt32

func GetInt32(k string) (int32, error)

func GetInt64

func GetInt64(k string) (int64, error)

func GetStr

func GetStr(k string) (string, error)

func GetUint

func GetUint(k string) (uint, error)

func GetUint32

func GetUint32(k string) (uint32, error)

func GetUint64

func GetUint64(k string) (uint64, error)

func HIncr

func HIncr(key, subKey string) error

func HIncrEx

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

func HSet

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

func HSetEx

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

func Incr

func Incr(k string) error

func IncrEx

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

func InitCache

func InitCache() (needRun bool, err error)

func Set

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

func SetEx

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

Types

type Init

type Init struct {
}

func (*Init) Init

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

func (*Init) Name

func (p *Init) Name() string

func (*Init) WaitFinish

func (p *Init) WaitFinish()

Jump to

Keyboard shortcuts

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