MCPcopy Create free account
hub / github.com/cloudbase/garm / SetTemplateCache

Method SetTemplateCache

cache/template_cache.go:25–30  ·  view source on GitHub ↗
(tpl params.Template)

Source from the content-addressed store, hash-verified

23}
24
25func (t *TemplateCache) SetTemplateCache(tpl params.Template) {
26 t.mux.Lock()
27 defer t.mux.Unlock()
28
29 t.cache[tpl.ID] = tpl
30}
31
32func (t *TemplateCache) GetTemplate(id uint) (params.Template, bool) {
33 t.mux.Lock()

Callers 1

SetTemplateCacheFunction · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected