Documentation ¶
Index ¶
Constants ¶
View Source
const (
NavigationCacheKey = "navigation-cache"
)Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶ added in v1.56.0
type List struct {
}List is a list of caches for the dp-frontend-dataset-controller
type NavigationCache ¶
type NavigationCache struct {
}NavigationCache is a wrapper to dpcache.Cache which has additional fields and methods specifically for caching navigation data
func NewNavigationCache ¶
func NewNavigationCache(ctx context.Context, updateInterval *time.Duration) (*NavigationCache, error)
NewNavigationCache create a navigation cache object to be used in the service which will update at every updateInterval If updateInterval is nil, this means that the cache will only be updated once at the start of the service
func (*NavigationCache) AddUpdateFunc ¶
func (nc *NavigationCache) AddUpdateFunc(key string, updateFunc func() *models.Navigation)
AddUpdateFunc adds an update function to the cache
func (*NavigationCache) GetCachingKeyForNavigationLanguage ¶
func (nc *NavigationCache) GetCachingKeyForNavigationLanguage(lang string) string
func (*NavigationCache) GetNavigationData ¶
func (nc *NavigationCache) GetNavigationData(ctx context.Context, lang string) (*models.Navigation, error)
Click to show internal directories.
Click to hide internal directories.