boltcache

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltLRUCache

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

BoltLRUCache implement a LRU cache with BoltDB

func New

func New(path string, params url.Values) (*BoltLRUCache, error)

New LRU cache using BoltDB as storage backend

func (*BoltLRUCache) Clear added in v1.2.0

func (c *BoltLRUCache) Clear() error

Clear cache (for testing usage)

func (*BoltLRUCache) Close

func (c *BoltLRUCache) Close() error

Close cache

func (*BoltLRUCache) Get

func (c *BoltLRUCache) Get(key string) (value []byte, err error)

Get item from cache

func (*BoltLRUCache) Put

func (c *BoltLRUCache) Put(key string, value []byte) error

Put item into the cache

Jump to

Keyboard shortcuts

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