cachex

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCache

func InitCache(cfg Config) error

Types

type Cache added in v0.0.4

type Cache interface {
	Set(key, val string, expiration time.Duration) error
	SetNoExpiration(key, val string) error
	Get(key string) (string, error)
	Del(keys ...string) error
	Clear() error
}
var C Cache

func NewGoCache added in v0.0.4

func NewGoCache() Cache

func NewRedisCache added in v0.0.4

func NewRedisCache(cfg Config) (Cache, error)

type Config

type Config struct {
	redisx.Config
	Type string `mapstructure:"type"`
}

Jump to

Keyboard shortcuts

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