MCPcopy
hub / github.com/glanceapp/glance / withCacheDuration

Method withCacheDuration

internal/glance/widget.go:259–269  ·  view source on GitHub ↗
(duration time.Duration)

Source from the content-addressed store, hash-verified

257}
258
259func (w *widgetBase) withCacheDuration(duration time.Duration) *widgetBase {
260 w.cacheType = cacheTypeDuration
261
262 if duration == -1 || w.CustomCacheDuration == 0 {
263 w.cacheDuration = duration
264 } else {
265 w.cacheDuration = time.Duration(w.CustomCacheDuration)
266 }
267
268 return w
269}
270
271func (w *widgetBase) withCacheOnTheHour() *widgetBase {
272 w.cacheType = cacheTypeOnTheHour

Callers 15

initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected