cachy
cachy copied to clipboard
named templates
Implement named templates
Currenlty Cachy is slower when executing multiple templates, due to the fact that it does slighlty more than just executing, e.g. checking if the template is already cached + caching it if not.
Creating named templates would allow Cachy to cache a template consisting of multiple files at startup, instead of checking the cache at executing.
type namedTemplate struct {
files map[string][]string
tmpl *template.Template
}
type Cachy struct {
...
nameTemplates map[string]namedTemplate
}
Something like this?