[stringtemplate-interest] StringTemplate V3.2 for .Net framework -template caching problem
Florin Dumitrescu
dumitrescu.florin at gmail.com
Thu Nov 19 12:00:17 PST 2009
Hi Sam,
And thanks for the quick reply. At the moment I am thinking of using the
older C# port of StringTemplate, v3.1, since it seems to cover all my needed
functionality, is better documented and has better caching support. Would
there be any reason for me not do that and continue with v3.2, or put it in
another way, are there any major improvements in v3.2? When are you planning
to release v4?
Best regards,
Florin
On Thu, Nov 19, 2009 at 9:47 PM, Sam Harwell <sharwell at pixelminegames.com>wrote:
> 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#DefiningTemplates-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/1efea601/attachment.html
More information about the stringtemplate-interest
mailing list