refreshcache

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

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

type RefreshCache

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

func Init

func Init(logger *slog.Logger) *RefreshCache

func (*RefreshCache) Add

func (c *RefreshCache) Add(ctx context.Context, key string, fetch func(ctx context.Context) (any, error), interval time.Duration) error

func (*RefreshCache) Get

func (c *RefreshCache) Get(key string) (any, error)

func (*RefreshCache) Wait

func (c *RefreshCache) Wait()

Jump to

Keyboard shortcuts

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