cache

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New(ctx context.Context, cacheConf config.Cache) (DB, error)

func (DB) Close

func (db DB) Close()

func (DB) GetResults

func (db DB) GetResults(q string, cat category.Name, opts options.Options) ([]result.Result, error)

func (DB) GetResultsTTL

func (db DB) GetResultsTTL(q string, cat category.Name, opts options.Options) (time.Duration, error)

func (DB) SetResults

func (db DB) SetResults(q string, cat category.Name, opts options.Options, results []result.Result, ttl ...time.Duration) error

type Driver

type Driver interface {
	Close()
	Set(k string, v any, ttl ...time.Duration) error
	Get(k string, o any) error
	GetTTL(k string) (time.Duration, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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