cache

package
v0.0.0-...-a976274 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuchKey = errors.New("no such key")

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(db *DB) *Cache

func (*Cache) Clean

func (c *Cache) Clean() error

func (*Cache) Get

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

func (*Cache) Put

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

type DB

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

func NewDB

func NewDB(path string) (*DB, error)

func (*DB) Clean

func (d *DB) Clean(timestamp time.Time) error

func (*DB) Close

func (d *DB) Close() error

func (*DB) Get

func (d *DB) Get(key string) ([]byte, error)

func (*DB) Put

func (d *DB) Put(key string, timestamp time.Time, blob []byte) error

func (*DB) Touch

func (d *DB) Touch(key string, timestamp time.Time) error

Jump to

Keyboard shortcuts

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