caches

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashMessages

func HashMessages(salt string, inputs []jpf.Message) string

func NewFile

func NewFile(filename string) (jpf.ModelResponseCache, error)

NewFile creates an in-memory cache that persists to the given filename. On creation, it loads the cache from the file (if it exists). Whenever SetCachedResponse is called, the entire cache is saved back to the file.

func NewRAM

func NewRAM() jpf.ModelResponseCache

NewRAM creates an in-memory implementation of ModelResponseCache. It stores model responses in memory using a hash of the input messages as a key.

func NewSQL

func NewSQL(ctx context.Context, db *sql.DB) (jpf.ModelResponseCache, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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