cache

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheSeparator = "|"
)

Variables

View Source
var (
	ErrMiss = cache.ErrCacheMiss

	DefaultTTL = 5 * time.Minute
)

Functions

func KeyFromParts

func KeyFromParts(parts ...string) string

Types

type Cache

type Cache interface {
	Get(context.Context, string) ([]byte, error)
	Set(context.Context, string, []byte, time.Duration) error
}

func New

func New(redisConn *redis.Client) Cache

Jump to

Keyboard shortcuts

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