cache

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(key string, value any, ttl ...time.Duration) error
	Get(key string) (any, error)
	IsAvailable() bool
}

func ConfigureDefault

func ConfigureDefault(config Config) (Cache, error)

func ConfigureRedis

func ConfigureRedis(config Config) (Cache, error)

func New

func New(config Config) (Cache, error)

type Config

type Config struct {
	Driver Driver
	URL    string
}

type Driver

type Driver string
const (
	DriverRedis Driver = "redis"
)

Jump to

Keyboard shortcuts

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