cache

package
v0.0.0-...-54e49cf Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelCache

func DelCache(ctx context.Context, key string) error

func GetBytes

func GetBytes(ctx context.Context, key string) (val []byte, err error)

func GetCookie

func GetCookie(ctx context.Context, key string) (val string, err error)

func GetInt

func GetInt(ctx context.Context, key string) (val int, err error)

func GetObject

func GetObject(ctx context.Context, key string) (val interface{}, err error)

func GetString

func GetString(ctx context.Context, key string) (val string, err error)

func SetBytes

func SetBytes(ctx context.Context, key string, val []byte, ttl int64) error

func SetCookie

func SetCookie(ctx context.Context, key string, val string, ttl int64) error

func SetInt

func SetInt(ctx context.Context, key string, val int, ttl int64) error

func SetObject

func SetObject(ctx context.Context, key string, val interface{}, ttl int64) error

func SetString

func SetString(ctx context.Context, key string, val string, ttl int64) error

Types

type RedisClient

type RedisClient struct {
	*redis.Client
	DB int
}

func GetCacheClient

func GetCacheClient() *RedisClient

func NewRedisClient

func NewRedisClient(cfg *config.Config) *RedisClient

Jump to

Keyboard shortcuts

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