badger

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package badger is the BadgerDB implementation of the Trickster Cache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheClient

type CacheClient struct {
	Name   string
	Config *options.Options
	// contains filtered or unexported fields
}

CacheClient describes a Badger CacheClient

func New

func New(name string, cfg *options.Options) *CacheClient

func (*CacheClient) Close

func (c *CacheClient) Close() error

func (*CacheClient) Connect

func (c *CacheClient) Connect() error

Connect opens the configured Badger key-value store

func (*CacheClient) Remove

func (c *CacheClient) Remove(cacheKeys ...string) error

func (*CacheClient) Retrieve

func (c *CacheClient) Retrieve(cacheKey string) ([]byte, status.LookupStatus, error)

Retrieve gets data from the Badger Cache using the provided Key because Badger manages Object Expiration internally, allowExpired is not used.

func (*CacheClient) Store

func (c *CacheClient) Store(cacheKey string, data []byte, ttl time.Duration) error

Store places the the data into the Badger Cache using the provided Key and TTL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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