mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
cache only embedded templates
This commit is contained in:
parent
caabd069d6
commit
7b558c529b
@ -35,7 +35,9 @@ func Render(path string, writer io.Writer, data interface{}) {
|
||||
return template.HTML(content)
|
||||
},
|
||||
}).ParseFS(FS, path))
|
||||
FS.templates[path] = tmpl
|
||||
if FS.embedded != nil {
|
||||
FS.templates[path] = tmpl
|
||||
}
|
||||
}
|
||||
tmpl.Execute(writer, data)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user