cache

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoginStatus = "LoginStatus"
)

Variables

View Source
var Config = struct {
	Ip      string
	Port    string
	Db      string
	Session struct {
		Db                      string
		TempSessionAliveSeconds int
		ActiveSeconds           int
		Refresh                 bool
	}
}{}
View Source
var Session session

Functions

func Del

func Del(key string) (err error)

func Exist

func Exist(key string) (result bool, err error)

func Expire

func Expire(key string, seconds int) (err error)

func Get

func Get(key string) (value interface{}, err error)

func GetConn

func GetConn() (conn redis.Conn)

func GetConnWithNum

func GetConnWithNum(dbNum string) (conn redis.Conn)

func HDel

func HDel(key string, field string) (err error)

func HGet

func HGet(key string, field string) (result interface{}, err error)

func HSet

func HSet(key string, field string, value interface{}) (err error)

func Set

func Set(key string, value interface{}) (err error)

func SetEx

func SetEx(key string, seconds int, value interface{}) (err error)

Types

type ConnProxy added in v0.5.7

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

func GetProxy added in v0.5.7

func GetProxy(dbNum string) *ConnProxy

func (*ConnProxy) Del added in v0.5.7

func (proxy *ConnProxy) Del(key string) (err error)

func (*ConnProxy) Exist added in v0.5.7

func (proxy *ConnProxy) Exist(key string) (result bool, err error)

func (*ConnProxy) Expire added in v0.5.7

func (proxy *ConnProxy) Expire(key string, seconds int) (err error)

func (*ConnProxy) Get added in v0.5.7

func (proxy *ConnProxy) Get(key string) (value interface{}, err error)

func (*ConnProxy) HDel added in v0.5.7

func (proxy *ConnProxy) HDel(key string, field string) (err error)

func (*ConnProxy) HGet added in v0.5.7

func (proxy *ConnProxy) HGet(key string, field string) (result interface{}, err error)

func (*ConnProxy) HSet added in v0.5.7

func (proxy *ConnProxy) HSet(key string, field string, value interface{}) (err error)

func (*ConnProxy) Set added in v0.5.7

func (proxy *ConnProxy) Set(key string, value interface{}) (err error)

func (*ConnProxy) SetEx added in v0.5.7

func (proxy *ConnProxy) SetEx(key string, seconds int, value interface{}) (err error)

Jump to

Keyboard shortcuts

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