cache

package
v0.0.0-...-47bc026 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorKeyNotFound = errors.New("key not found")

Functions

This section is empty.

Types

type BadgerCache

type BadgerCache struct {
	Db *badger.DB
}

func NewBadgerCache

func NewBadgerCache(db *badger.DB) *BadgerCache

func (*BadgerCache) Get

func (c *BadgerCache) Get(typ rune, key string) ([]byte, error)

func (*BadgerCache) Has

func (c *BadgerCache) Has(typ rune, key string) (bool, error)

func (*BadgerCache) Set

func (c *BadgerCache) Set(typ rune, key string, value []byte) error

type Cache

type Cache interface {
	Set(typ rune, key string, value []byte) error
	Get(typ rune, key string) ([]byte, error)
	Has(typ rune, key string) (bool, error)
}

Jump to

Keyboard shortcuts

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