cache

package
v0.0.0-...-491e088 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 1 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 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 Keys

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

func NewCache

func NewCache(cfg interface{})

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 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 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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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