cache only embedded templates
This commit is contained in:
parent
caabd069d6
commit
7b558c529b
1 changed files with 3 additions and 1 deletions
|
|
@ -35,8 +35,10 @@ func Render(path string, writer io.Writer, data interface{}) {
|
|||
return template.HTML(content)
|
||||
},
|
||||
}).ParseFS(FS, path))
|
||||
if FS.embedded != nil {
|
||||
FS.templates[path] = tmpl
|
||||
}
|
||||
}
|
||||
tmpl.Execute(writer, data)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue