cachy icon indicating copy to clipboard operation
cachy copied to clipboard

named templates

Open abenz1267 opened this issue 5 years ago • 0 comments

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?

abenz1267 avatar Jan 11 '20 11:01 abenz1267