Use to cache parsed templates. Templates are stored in a map with the full path as key. When a template file has changed, the cache will remove the old template from the cache and load a new one.
Constructor. The cache must be created and not destroyed as long as it is used.
const Path & path
Add a path for resolving template paths. The order of check is FIFO.
Returns a template from the cache. When the template file is not yet loaded or when the file has changed, the template will be (re)loaded and parsed. A shared pointer is returned, so it is safe to use this template even when the template isn't stored anymore in the cache.
static TemplateCache * instance();
Returns the only instance of this cache
Logger & logger
Sets the logger for the cache.