cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheFull error = errors.New("cache is full")
View Source
var ErrCacheTooCostly error = errors.New("item too costly for cache")
View Source
var ErrCacheWrongType error = errors.New("requested cache exists with that name, but a different type")

Functions

This section is empty.

Types

type Cache

type Cache[T any] interface {
	Get(key string) (T, bool)
	Set(key string, value T, cost uint64, expiresInSeconds int64) error
	Delete(key string)
	Close()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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