cache

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cache is a bbolt content-hash cache: identical (task+input+params+ model+grammar) requests return the stored result and skip the model entirely.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(parts ...string) string

Key derives a stable cache key from the given parts.

Types

type Cache

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

func Open

func Open(path string) (*Cache, error)

Open opens (creating if needed) the cache db.

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, bool)

Get returns the stored value and true if present.

func (*Cache) Put

func (c *Cache) Put(key string, val []byte) error

Put stores val under key.

Jump to

Keyboard shortcuts

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