cache

package
v0.0.0-...-37fef2a Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(key string) error

func Dels

func Dels(keys []string) error

func Exists

func Exists(key string) (bool, error)

func ExpireAt

func ExpireAt(key string, expireAt int64) error

func Get

func Get(key string) ([]byte, error)

func HDel

func HDel(key string, fields ...[]byte) (int64, error)

func HExists

func HExists(key string, field []byte) (bool, error)

func HGetAll

func HGetAll(key string) ([][]byte, error)

func HMGet

func HMGet(key string, fields ...[]byte) ([][]byte, error)

func HMSet

func HMSet(key string, ttl int64, args ...[]byte) error

func HVals

func HVals(key string) ([][]byte, error)

func Incr

func Incr(key string) (int64, error)

func IsInit

func IsInit() bool

func Keys

func Keys(keyFormat string) ([][]byte, error)

func LPush

func LPush(key string, ttl int64, args ...[]byte) error

func Publish

func Publish(channel string, members ...[]byte) (int64, error)

func SAdd

func SAdd(key string, ttl int64, members ...[]byte) error

func SCard

func SCard(key string) (int64, error)

func SIsMember

func SIsMember(key string, member []byte) (bool, error)

func SMembers

func SMembers(key string) ([][]byte, error)

func SRem

func SRem(key string, members ...[]byte) (int64, error)

func SScan

func SScan(key string, count int64) ([][]byte, error)

func Set

func Set(key string, value []byte, ttl int64) error

func ZAdd

func ZAdd(key string, ttl int64, args ...[]byte) error

func ZRange

func ZRange(key string, start, stop int64, withScores bool) ([][]byte, error)

func ZRem

func ZRem(key string, members ...[]byte) (int64, error)

func ZRemRangeByScore

func ZRemRangeByScore(key string, start, stop int64) (int64, error)

Types

type Cache

type Cache interface {
	Set(key string, value []byte, ttl int64) error

	Get(key string) ([]byte, error)

	Del(key string) error

	Dels(keys []string) error

	Exists(key string) (bool, error)

	Keys(keyFormat string) ([][]byte, error)

	HMSet(key string, ttl int64, args ...[]byte) error

	HMGet(key string, fields ...[]byte) ([][]byte, error)

	HDel(key string, fields ...[]byte) (int64, error)

	HGetAll(key string) ([][]byte, error)

	HVals(key string) ([][]byte, error)

	HExists(key string, field []byte) (bool, error)

	SAdd(key string, ttl int64, members ...[]byte) error

	SCard(key string) (int64, error)

	SRem(key string, members ...[]byte) (int64, error)

	SMembers(key string) ([][]byte, error)

	SIsMember(key string, member []byte) (bool, error)

	ZAdd(key string, ttl int64, args ...[]byte) error

	Incr(key string) (int64, error)

	ExpireAt(key string, expireAt int64) error

	ZRange(key string, start, stop int64, withScores bool) ([][]byte, error)

	ZRemRangeByScore(key string, start, stop int64) (int64, error)

	ZRem(key string, members ...[]byte) (int64, error)

	LPush(key string, ttl int64, args ...[]byte) error

	Publish(channel string, members ...[]byte) (int64, error)

	SScan(key string, count int64) ([][]byte, error)
}

func GetCache

func GetCache(Db ...int) (Cache, error)

func NewCache

func NewCache(cfg ...interface{}) Cache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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