bolt

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(store map[string]interface{}) (cache.Cache, error)

func NewFromPath

func NewFromPath(dir string) (cache.Cache, error)

Types

type Cache

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

func (*Cache) ClearAll

func (p *Cache) ClearAll() (err error)

ClearAll clear all cache

func (*Cache) Close

func (p *Cache) Close() error

func (*Cache) Delete

func (p *Cache) Delete(key string)

Delete delete cached value by key

func (*Cache) Get

func (p *Cache) Get(key string) (value []byte, ok bool)

Get get cached value by key

func (*Cache) GetRange

func (p *Cache) GetRange(key string, low, high int64) (value []byte, ok bool)

GetRange

func (*Cache) Set

func (p *Cache) Set(key string, value []byte)

func (*Cache) SetTimeout

func (p *Cache) SetTimeout(key string, value []byte, timeout time.Duration) (err error)

Put set cached value with key and expire time

Jump to

Keyboard shortcuts

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