Our TemplateRenderer abstraction has a single mustache implementation for now. Templates are compiled and rendered every single time a project requests content.
The compiled template should be cached at a bare minimum. We should also consider caching the output if we can.
To enable this, we need to be able to provide a Cache to MustacheTemplateRenderer and change it in such a way that it can compute unique keys for a given template source. I am not keen to expose that to the caller so we should have some sort of factory object to create the template renderer, something similar to IndentWriterFactory perhaps?
Our
TemplateRenderer
abstraction has a single mustache implementation for now. Templates are compiled and rendered every single time a project requests content.The compiled template should be cached at a bare minimum. We should also consider caching the output if we can.
To enable this, we need to be able to provide a
Cache
toMustacheTemplateRenderer
and change it in such a way that it can compute unique keys for a given template source. I am not keen to expose that to the caller so we should have some sort of factory object to create the template renderer, something similar toIndentWriterFactory
perhaps?