Hi, In my application, I used Velocity engine as a separate instance each time for evaluating templates, basically non-singlton. I find the performance is not that bad.
What I did is that, I created a class called VelocityParser and have it encapsulate the VelocityEngine class. Each time I want to render a template, I used new VelocityParser().render(...), which in turn, new up a VelocityEngine object and does the real rendering. This way, there is no template caching issue. You can even turn on template caching and make a singlton class afterwards by doing: VelocityParser.newInstance().render(...). Cheers, Jian >===== Original Message From "Steve O'Hara" <[EMAIL PROTECTED]> ===== >Hi Shinobu, > >Yeh, it's a mystery.......... >To check that it definitely wasn't the browser cache, I set an expires >header and no-cache control. >Also, I switched from IE to Mozilla whilst Tomcat was running and it still >showed the cached page. >It does show any changed context data, which would also indicate that it >isn't a browser issue. > >I suppose I'm getting to the poitn where I'll need to download the Velocity >source and debug it.......? > >Steve > > >-----Original Message----- >From: Shinobu Kawai [mailto:[EMAIL PROTECTED] >Sent: 23 October 2004 17:38 >To: Velocity Users List >Subject: Re: Template Cacheing > > >Hi Steve, > >> Thanks for your notes, but I still can't turn the cacheing off. >> >> This is my code............ > >## snip > >> What am I doing wrong ? >Hmm. AFAICS, nothing. Actually your code worked in my environment. >(I use Tomcat 5.5, but that shouldn't matter.) Even more, >FileResourceLoader doesn't cache by default. Could it be that your >browser is caching, and not Velocity? > >Best regards, >-- Shinobu Kawai > >-- >Shinobu Kawai <[EMAIL PROTECTED]> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]