cache

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 8 Imported by: 0

README

file-cache

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCachePath = "cache"

DefaultCachePath ...

View Source
var ErrNotFound = errors.New("data not found")

ErrNotFound ...

Functions

func New added in v0.0.4

func New() cacher.Cacher

New ...

Types

type FileCache

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

FileCache ...

func (*FileCache) Clear

func (f *FileCache) Clear() error

Clear ...

func (*FileCache) Delete

func (f *FileCache) Delete(key string) error

Delete ...

func (*FileCache) DeleteMultiple

func (f *FileCache) DeleteMultiple(keys ...string) error

DeleteMultiple ...

func (FileCache) Get

func (f FileCache) Get(key string) ([]byte, error)

Get ...

func (FileCache) GetD

func (f FileCache) GetD(key string, v []byte) []byte

GetD ...

func (*FileCache) GetMultiple

func (f *FileCache) GetMultiple(keys ...string) (map[string][]byte, error)

GetMultiple ...

func (*FileCache) Has

func (f *FileCache) Has(key string) (bool, error)

Has ...

func (*FileCache) Set

func (f *FileCache) Set(key string, val []byte) error

Set ...

func (*FileCache) SetMultiple

func (f *FileCache) SetMultiple(values map[string][]byte) error

SetMultiple ...

func (*FileCache) SetWithTTL

func (f *FileCache) SetWithTTL(key string, val []byte, ttl int64) error

SetWithTTL ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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