redis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisClient *redis.Client

Functions

func InitRedis

func InitRedis(addr, password string) error

Types

type RedisCache

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

func NewRedisHandle

func NewRedisHandle(ctx context.Context, client *redis.Client) *RedisCache

func (*RedisCache) Delete

func (r *RedisCache) Delete(key string) error

func (*RedisCache) Get

func (r *RedisCache) Get(key string) ([]byte, error)

func (*RedisCache) Set

func (r *RedisCache) Set(key string, val []byte) error

func (*RedisCache) SetDefaultExp

func (r *RedisCache) SetDefaultExp(exp time.Duration)

func (*RedisCache) SetE

func (r *RedisCache) SetE(key string, value []byte, exp time.Duration) error

Jump to

Keyboard shortcuts

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