cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIDNotFound = errors.New("cache item not found")

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Save(key string, value string, ttl time.Duration) error
	Get(key string) (string, error)
	Exists(key string) (bool, error)
	Delete(key string) error
	ClearOutdated() error
	ClearAll() error
}

func NewCache

func NewCache(db database) Cache

Jump to

Keyboard shortcuts

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