cache

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(args ...any)
	Info(args ...any)
	Error(args ...any)

	Debugf(format string, args ...any)
	Infof(format string, args ...any)
	Errorf(format string, args ...any)
}

type RedisCache

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

func NewRedisCache

func NewRedisCache(redisHost string, redisPort int, redisUsername string, redisPassword string, redisDB int, logger ...Logger) *RedisCache

func (*RedisCache) Close

func (r *RedisCache) Close() error

func (*RedisCache) Delete

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

func (*RedisCache) Get

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

func (*RedisCache) GetBind

func (r *RedisCache) GetBind(key string, bindPtr any) error

func (*RedisCache) Set

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

func (*RedisCache) SetBind

func (r *RedisCache) SetBind(key string, bindPtr any, expire time.Duration) error

Jump to

Keyboard shortcuts

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