Re: Problem on Freemarker Template Cache?

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Friday, July 18, 2008, 7:49:20 PM, Lihui Pang wrote:

> Hi Daniel,
>
> Thanks for the quick reply.
>
> Look like I didn't make my problem clear. I am not testing slow down
> issue. I am testing that why the template can NOT be found in the
> cache during my integration test.
>
> In my unit test, the method only test the part of getting template I
> run the same tests twice, in the second time, the template can be
> loaded from cache - I see the message in the log.
>
> In my integration test, the method tests the business logic that has
> call to get template. It runs against application in JBoss server.
> Again I run them twice, but in the second time, I still get the
> message of
> "DEBUG [freemarker.cache] Could not find template in cache, creating
> new one", except for one template that is called twice during a very
> short time.
>
> So I am wondering if the template is expired from cache, or is removed
> by JVM ( I am using JBoss server).
>
> There are only 22 templates in my application.
>
> Please help.
>
> Thanks,
> Lihui

Strange. It shouldn't do that, unless you want to cache more templates
than the "strong" limit. In that case a template may be moved over to
the soft part, where the JVM can delete it if it wants to. So, you
have "strong: 20" and 22 templates... what's if you are using, like,
"strong: 25"? (And are you sure you don't re-create the configuration
somewhere? With that you lose the previous cache.)

-- 
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.