filecache

package
v1.6.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCacheDir = "/tmp"

DefaultCacheDir ...

Functions

This section is empty.

Types

type Config

type Config struct {
	CacheDir string
	Prefix   string
}

Config ...

type FileCache

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

FileCache ...

func NewFileCache

func NewFileCache(config *Config) (*FileCache, error)

NewFileCache ...

func (*FileCache) Get

func (f *FileCache) Get(key string, dst interface{}) error

Get reads item from cache

func (*FileCache) Set

func (f *FileCache) Set(key string, data interface{}, expire time.Duration) error

Set writes item to cache

Jump to

Keyboard shortcuts

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