cache

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 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 added in v0.12.0

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

func (DB) Close

func (db DB) Close()

func (DB) GetResults added in v0.19.0

func (db DB) GetResults(query string, options engines.Options) ([]result.Result, error)

func (DB) GetResultsTTL added in v0.19.0

func (db DB) GetResultsTTL(query string, options engines.Options) (time.Duration, error)

func (DB) SetResults added in v0.19.0

func (db DB) SetResults(query string, options engines.Options, results []result.Result, ttl ...time.Duration) error

type Driver added in v0.19.0

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