On Jan 24 2017, at 10:25 am, Daniel Dekany <ddek...@freemail.hu> wrote:  

> Tuesday, January 24, 2017, 6:48:16 PM, David E Jones wrote:

>

> > but all other Configuration.getTemplate() methods call this method  

>

> > so it is an easy way to override all Template loading (assuming you  
> are doing your own caching and so on, which is part of what I wanted  
> in this case, ie use a managed cache external to FreeMarker that  
> other things also use instead of the cache internal to FreeMarker).

>

> That's another thing I definitely want to solve in FM3 (I'm not sure  
if I want to go into that in FM2 though), but by providing a setting  
like cfg.templateResolver (TemplateResolver interface), which has some  
minimalistic "give me a template like this somehow" method, and  
default implementation that delegates to TemplateCache.

  

Being able to implement an interface and register it with the Configuration
would be great, much better than hacking around in the implementation of
FreeMarker while still being able to override the Template loading behavior
completely (including caching, location resolution, etc). So yes, this sounds
great.

  

-David

  

  

Reply via email to