cache

package
v0.0.0-...-5f5e9cb Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IDKey       = bsonutil.MustHaveTag(cacheItem{}, "ID")
	ContentsKey = bsonutil.MustHaveTag(cacheItem{}, "Contents")
	UpdatedKey  = bsonutil.MustHaveTag(cacheItem{}, "Updated")
)

Functions

This section is empty.

Types

type DBCache

type DBCache struct{}

DBCache stores and retrieves binary data in the database.

func (*DBCache) Delete

func (c *DBCache) Delete(ctx context.Context, key string) error

Delete removes the value associated with the key.

func (*DBCache) Get

func (c *DBCache) Get(ctx context.Context, key string) ([]byte, bool, error)

Get returns the []byte representation of a cached value and a bool set to true if the value isn't empty.

func (*DBCache) Set

func (c *DBCache) Set(ctx context.Context, key string, valueBytes []byte) error

Set stores valueBytes for key.

Jump to

Keyboard shortcuts

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