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

cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(server, tool string, args json.RawMessage) ([]byte, int, bool)

Get looks up a cached response. Returns nil if not found or expired.

func GetMetadata

func GetMetadata(server, tool string, args json.RawMessage) (time.Duration, time.Duration, bool)

GetMetadata returns cache age and ttl when a valid entry exists.

func Put

func Put(server, tool string, args json.RawMessage, content []byte, exitCode int, ttl time.Duration) error

Put stores a response in the cache.

Types

This section is empty.

Jump to

Keyboard shortcuts

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