cache

package
v0.129.13 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	DefaultApp string `json:"default_app"`

	LastAppRefresh *time.Time  `json:"last_app_refresh"`
	Apps           []types.App `json:"apps"`
}

func InitCache

func InitCache() (*Cache, error)

func (*Cache) ClearDefault

func (c *Cache) ClearDefault(defaultType string) error

func (Cache) GetApp

func (c Cache) GetApp(appSlugOrID string) (*types.App, error)

func (Cache) GetAppByID added in v0.129.13

func (c Cache) GetAppByID(appID string) (*types.App, error)

GetAppByID returns a cached app only for an exact app ID match. Unlike app IDs, slugs cannot be resolved safely from this cache because it is shared across API origins. The same slug can refer to different app IDs in production, staging, and local development environments.

func (*Cache) GetDefault added in v0.89.0

func (c *Cache) GetDefault(defaultType string) (string, error)

func (*Cache) Save

func (c *Cache) Save() error

func (*Cache) SetApp

func (c *Cache) SetApp(app *types.App) error

func (*Cache) SetDefault

func (c *Cache) SetDefault(defaultType string, defaultValue string) error

Jump to

Keyboard shortcuts

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