cache

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(cache SemanticCache, logger logging.Logger, metrics core.Metrics) pipeline.Step[*core.RetrievalContext]

func Store

func Store(cache SemanticCache, logger logging.Logger, metrics core.Metrics) pipeline.Step[*core.RetrievalContext]

Types

type CacheResult

type CacheResult struct {
	Hit    bool
	Answer string
}

type SemanticCache

type SemanticCache interface {
	CheckCache(ctx context.Context, query *core.Query) (*CacheResult, error)
	CacheResponse(ctx context.Context, query *core.Query, answer *core.Result) error
}

SemanticCache is an interface for cache operations.

Jump to

Keyboard shortcuts

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