cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheManager

type CacheManager[T any] interface {
	Get(key Key) (T, error)
}

func NewManager

func NewManager[T any](fetcher Fetcher[T]) CacheManager[T]

type CacheManagerImpl

type CacheManagerImpl[T any] struct {
	// contains filtered or unexported fields
}

func (*CacheManagerImpl[T]) Get

func (c *CacheManagerImpl[T]) Get(key Key) (T, error)

type Fetcher

type Fetcher[T any] interface {
	Fetch(key Key) (T, error)
}

type Key

type Key interface {
	CacheKey() string
}

Jump to

Keyboard shortcuts

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