diskcache

package
v0.0.0-...-34b89f8 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCache

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

func New

func New(fs afero.Fs, root string) *FileCache

func (*FileCache) Delete

func (f *FileCache) Delete(ctx context.Context, key string) error

func (*FileCache) Load

func (f *FileCache) Load(ctx context.Context, key string) (value []byte, exist bool, err error)

func (*FileCache) Store

func (f *FileCache) Store(ctx context.Context, key string, value []byte) error

type Interface

type Interface interface {
	Store(ctx context.Context, key string, value []byte) error
	Load(ctx context.Context, key string) (value []byte, exist bool, err error)
	Delete(ctx context.Context, key string) error
}

type NoOp

type NoOp struct {
}

func NewNoOp

func NewNoOp() *NoOp

func (*NoOp) Delete

func (n *NoOp) Delete(ctx context.Context, key string) error

func (*NoOp) Load

func (n *NoOp) Load(ctx context.Context, key string) (value []byte, exist bool, err error)

func (*NoOp) Store

func (n *NoOp) Store(ctx context.Context, key string, value []byte) error

Jump to

Keyboard shortcuts

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