cache

package
v0.0.0-...-9c4fc95 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheDriver

type CacheDriver interface {
	HGet(key string, field string) (string, error)
	HDel(key string, fields ...string) (int64, error)
	Del(keys ...string) (int64, error)
	HSet(key string, values ...interface{}) (int64, error)
	Exists(keys ...string) (int64, error)
	SIsMember(key string, member interface{}) (bool, error)
	SMembers(key string) ([]string, error)
	SRem(key string, members ...interface{}) (int64, error)
	SAdd(key string, members ...interface{}) (int64, error)
	Expire(key string, expiration time.Duration) (bool, error)
}

func GetCacheDriver

func GetCacheDriver(driverName string) (CacheDriver, error)

type RedisCacheDriver

type RedisCacheDriver struct {
	// contains filtered or unexported fields
}

func (*RedisCacheDriver) Del

func (rcd *RedisCacheDriver) Del(keys ...string) (int64, error)

func (*RedisCacheDriver) Exists

func (rcd *RedisCacheDriver) Exists(keys ...string) (int64, error)

func (*RedisCacheDriver) Expire

func (rcd *RedisCacheDriver) Expire(key string, expiration time.Duration) (bool, error)

func (*RedisCacheDriver) HDel

func (rcd *RedisCacheDriver) HDel(key string, fields ...string) (int64, error)

func (*RedisCacheDriver) HGet

func (rcd *RedisCacheDriver) HGet(key string, field string) (string, error)

func (*RedisCacheDriver) HSet

func (rcd *RedisCacheDriver) HSet(key string, values ...interface{}) (int64, error)

func (*RedisCacheDriver) SAdd

func (rcd *RedisCacheDriver) SAdd(key string, members ...interface{}) (int64, error)

func (*RedisCacheDriver) SIsMember

func (rcd *RedisCacheDriver) SIsMember(key string, member interface{}) (bool, error)

func (*RedisCacheDriver) SMembers

func (rcd *RedisCacheDriver) SMembers(key string) ([]string, error)

func (*RedisCacheDriver) SRem

func (rcd *RedisCacheDriver) SRem(key string, members ...interface{}) (int64, error)

Jump to

Keyboard shortcuts

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