[stringtemplate-interest] StringTemplate V3.2 for .Net framework -template caching problem

Sam Harwell sharwell at pixelminegames.com
Thu Nov 19 11:47:30 PST 2009


Hi Florin,

 

That documentation refers to the older C# port of StringTemplate. There
is one other method you can use to refresh your templates: Set the
group's RefreshInterval. Keep in after each interval mind it always does
a "force refresh" and not a "refresh if changed" - however at least it's
only done when a template is requested and not on its own timer.


I really don't like the current loader configuration, and I'll
definitely be working to improve it in STv4.

 

Thanks,

Sam

 

From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Florin
Dumitrescu
Sent: Thursday, November 19, 2009 7:29 AM
To: stringtemplate-interest at antlr.org
Subject: [stringtemplate-interest] StringTemplate V3.2 for .Net
framework -template caching problem

 

Hi guys,

I am not a 100% sure that I'm sending this email to the right location,
so if I am wrong please redirect me.

I need a template engine for .Net and after studying a few alternatives
I came to the conclusion that StringTemplate is one of the best
solutions. So from today I have started using it. However, after just a
few minutes I found a problem. According to
http://www.antlr.org/wiki/display/ST/Defining+Templates#DefiningTemplate
s-Caching , the StringTemplateGroup class should use the
FileSystemWatcher class to check if the template file has changed.
However this is not the case. The template is cached forever and not
refreshed when the template file is updated. Also I did a quick check on
the sources using Reflector and it seems that the FileSystemWatcher is
never used. I am using version 3.2 of StringTemplate for .Net.

Is this a bug in the latest version or am I missing something?


Only the best regards,
Florin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091119/5cfa227e/attachment.html 


More information about the stringtemplate-interest mailing list