mredis

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MRedis

type MRedis struct {
	mstruct.MCacheConfig
	LockExpire time.Duration
}

func NewMRedis

func NewMRedis() *MRedis

实例化一个操作对象

func (*MRedis) Del

func (this *MRedis) Del(key string)

删除缓存

func (*MRedis) GetCache

func (this *MRedis) GetCache(key string) interface{}

获取缓存

func (*MRedis) Lock

func (this *MRedis) Lock(key string) bool

锁

func (*MRedis) SetCache

func (this *MRedis) SetCache(key string, val interface{}, expire time.Duration)

设置缓存

func (*MRedis) SetConn

func (this *MRedis) SetConn(host string, port int, pwd string, db int, poolSize int, maxIdle int)

设置连接

func (*MRedis) Unlock

func (this *MRedis) Unlock(key string)

解锁

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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