cache

package
v0.0.0-...-325abe0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(key string) (int64, error)

func Exist

func Exist(key string) (bool, error)

func Expire

func Expire(key string, expire int64) (bool, error)

func Get

func Get(key string) (string, error)

func Incrby

func Incrby(key string, v int64) (int64, error)

func ReleaseDistributedLock

func ReleaseDistributedLock(key string, v string) (bool, error)

func Set

func Set(key string, value string) error

func SetEx

func SetEx(key string, value string, second int64) error

func TryGetDistributedLock

func TryGetDistributedLock(key string, v string) (bool, error)

Types

type Cache

type Cache interface {
	Set(key string, value string) error
	SetEx(key string, value string, second int64) error
	Get(key string) (string, error)
	Del(key string) (int64, error)
	Exist(key string) (bool, error)
	Expire(key string, expire int64) (bool, error)
	Incrby(key string, v int64) (int64, error)

	TryGetDistributedLock(key string, v string) (bool, error)
	ReleaseDistributedLock(key string, v string) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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