cache

package
v0.0.0-...-ed00c80 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotExist = errors.New("key does not exists")
)

Functions

func Get

func Get(ctx context.Context, key string, container interface{}) error

Get gets the value of the key. container should be a pointer to the value.

func Init

func Init(ctx context.Context) (func(), error)

Init initializes the redis client

func Set

func Set(ctx context.Context, key string, value interface{}, expire time.Duration) error

Set sets the value of the key. It will overwrite any existing value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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