cache

package
v0.0.0-...-fc9d343 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 7 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(key string)

Delete removes the value associated with the key.

func (*DBCache) Get

func (c *DBCache) Get(key string) ([]byte, bool)

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(key string, valueBytes []byte)

Set stores valueBytes for key.

Jump to

Keyboard shortcuts

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