cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheEntryNotFound = errors.Newf("CACHE_ENTRY_NOT_FOUND", "cache entry not found")

Functions

This section is empty.

Types

type Cache

type Cache[T any] interface {
	Get(key string, dest *T) error
	Set(key string, value T) error
	Remove(key string) error
}

func NewInMemoryCache

func NewInMemoryCache[T any](name string, ttl time.Duration) (Cache[T], error)

Jump to

Keyboard shortcuts

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