protocache

package
v0.0.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheMiss = fmt.Errorf("cache miss")

Functions

This section is empty.

Types

type Cache

type Cache[T proto.Message] struct {
	// Dir overrides the cache directory. If empty, defaults to the user cache dir.
	Dir string
}

func (*Cache[T]) Load

func (c *Cache[T]) Load(key Key) (T, error)

func (*Cache[T]) Save

func (c *Cache[T]) Save(key Key, response T) error

type Key

type Key string

Jump to

Keyboard shortcuts

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