cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CacheTTL     = time.Hour * 24 * 7
	ErrNotCached = fmt.Errorf("no cache found")
)

Functions

func InverseKeyTransform

func InverseKeyTransform(pathKey *diskv.PathKey) (key string)

func KeyTransform

func KeyTransform(key string) *diskv.PathKey

func NewDiskVCache

func NewDiskVCache() (*diskv.Diskv, error)

Types

type DiskCache

type DiskCache interface {
	Write(key string, data []byte) error
	Has(key string) bool
	Read(key string) ([]byte, error)
	Erase(key string) error
	EraseAll() error
}

Jump to

Keyboard shortcuts

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