cache

package
v0.0.0-...-74adf86 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 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 Manager

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

Manager manages the catalog cache

func NewManager

func NewManager(loader *catalog.Loader, logger *zap.Logger, ttl time.Duration) *Manager

NewManager creates a new cache manager

func (*Manager) Get

func (m *Manager) Get(ctx context.Context) (*catalog.Catalog, error)

Get retrieves the current catalog, loading if necessary

func (*Manager) Invalidate

func (m *Manager) Invalidate()

Invalidate marks the cache as stale, forcing next Get to reload

func (*Manager) LoadedAt

func (m *Manager) LoadedAt() time.Time

LoadedAt returns when the catalog was last loaded

func (*Manager) Reload

func (m *Manager) Reload(ctx context.Context) (*catalog.Catalog, error)

Reload forces a reload of the catalog from git

Jump to

Keyboard shortcuts

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