cache

package
v0.0.0-...-5cadadf Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheMiss = errors.New("cache: key not found")

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(Key string, dest interface{}) error
	Set(Key string, value interface{}, ttl time.Duration) error
	Delete(key string) error
}

/ Cache is an interface for cache / destination must be a pointer

type CacheLifeTime

type CacheLifeTime = time.Duration
const (
	CacheLifeTimeNeverExpired CacheLifeTime = 0
)

type Codable

type Codable interface {
	Encode(interface{}) ([]byte, error)
	Decode([]byte, interface{}) error
}

func NewByteCodec

func NewByteCodec() Codable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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