badger_db

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCacheDB

func NewCacheDB(db *badger.DB) *Cache

func (*Cache) Clean

func (c *Cache) Clean() error

func (*Cache) Del

func (c *Cache) Del(key string) error

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, error)

func (*Cache) PrefixScanKey

func (c *Cache) PrefixScanKey(prefixStr string) ([]string, error)

func (*Cache) Set

func (c *Cache) Set(key string, value interface{}) error

func (*Cache) SetNX

func (c *Cache) SetNX(key string, value interface{}) error

func (*Cache) SetWithTTL

func (c *Cache) SetWithTTL(key string, value interface{}, duration time.Duration) error

Jump to

Keyboard shortcuts

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