Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheKey

func CacheKey(spec *models.EvalSpec, task *models.TestCase, fixtureDir string) (string, error)

CacheKey generates a unique cache key for a test case run The key is based on: - spec content (name, config, graders) - task content (test case definition) - model ID - fixture file hashes

func HasNonDeterministicGraders

func HasNonDeterministicGraders(spec *models.EvalSpec) bool

HasNonDeterministicGraders checks if any graders are non-deterministic Non-deterministic graders include: behavior and prompt

Types

type Cache

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

Cache provides caching for evaluation results

func New

func New(dir string) *Cache

New creates a new cache instance with the specified directory

func (*Cache) Clear

func (c *Cache) Clear() error

Clear removes all cached results

func (*Cache) Get

func (c *Cache) Get(key string) (*models.TestOutcome, bool)

Get retrieves a cached test outcome if it exists

func (*Cache) Put

func (c *Cache) Put(key string, outcome *models.TestOutcome) error

Put stores a test outcome in the cache

Jump to

Keyboard shortcuts

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