filecache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(hashKey string) (val []byte, hit bool, err error)
	Set(hashKey string, val []byte) error
	Delete(hashKey string) error
	Destroy() error
}

type FileCache

type FileCache struct {
	Basepath string
	// contains filtered or unexported fields
}

func New

func New(basepath string) (*FileCache, error)

func (*FileCache) Delete

func (fc *FileCache) Delete(hashKey string) error

func (*FileCache) Destroy

func (fc *FileCache) Destroy() error

func (*FileCache) Get

func (fc *FileCache) Get(hashKey string) (value []byte, hit bool, err error)

func (*FileCache) Set

func (fc *FileCache) Set(hashKey string, value []byte) error

Jump to

Keyboard shortcuts

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