cache

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(key string, value interface{}) bool

func AddTokenCache

func AddTokenCache(key string, value interface{}) bool

func Decrement

func Decrement(key string, value int64) (decremented int64, success bool)

func Forever

func Forever(key string, value interface{}) bool

func Forget

func Forget(key string) bool

func Get

func Get(key string, defaultValue ...interface{}) interface{}

func GetString

func GetString(key string) string

func Has

func Has(key string) bool

func Increment

func Increment(key string, value int64) (incremented int64, success bool)

func Padd

func Padd(key string, value proto.Message, future time.Duration) bool

func Pforever

func Pforever(key string, value proto.Message) bool

func Pget

func Pget(key string, valuePtr proto.Message, defaultValue ...proto.Message) error

func Ppull

func Ppull(key string, valuePtr proto.Message, defaultValue ...proto.Message) error

Ppull 取出值且删除(只取一次值并且删除,不复存在)

func Pput

func Pput(key string, value proto.Message, future time.Duration) bool

Pput 取出并不删除原始数据

func Prefix

func Prefix() string

func Pull

func Pull(key string, defaultValue ...interface{}) interface{}

func Put

func Put(key string, value interface{}) bool

func SetNx

func SetNx(key string, value string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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