cache

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultExpiration = 10 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(id string, v interface{}) error
	Get(id string, v interface{}) (bool, error)
	Delete(id string) error
}

func NewCache

func NewCache(config config.Cache) (Cache, error)

func NewMemoryCache

func NewMemoryCache() Cache

func NewRedisCache

func NewRedisCache(address, password string, redisDB, maxRetries int) Cache

func Prefixed

func Prefixed(cache Cache, prefix string) Cache

Jump to

Keyboard shortcuts

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