[Opensource] Getting use of the Cache System

Turgay Zengin turgay_zengin at hotmail.com
Thu Jun 13 04:36:27 PDT 2002


Mike, thanks for the clarification.

It turns out that I thought searchAndRetrieveList also cached its results, 
but it doesn't... Is it meaningful that this method also caches its results? 
It is easy to put "if (isCached()) addToCache();" for each field retrieved. 
What do you think?

Turgay

>From: Michael Rimov <rimovm at centercomp.com>
>Reply-To: opensource at jcorporate.com
>To: opensource at jcorporate.com
>Subject: Re: [Opensource] Getting use of the Cache System
>Date: Wed, 12 Jun 2002 14:07:37 -0700
>
>
>Hi Turgay!
>
>I came across that one about 3 months ago and I've been meaning to write an 
>article about it ever since.
>
>Here's the deal:
>
>Expresso Cache checks the System available memory before creating a new 
>'cache'.  The problem in this lies in the JVM.  If current heap allocation 
>is only 92 Mb even though Max is 256 Mb, the API call will only return 
>what's left from the current heap allocation, and worse yet, it doesn't 
>expose what the max potential is.
>
>I decided to keep that code in there because it helps to prevent crashes 
>near a system limit.  However, here's a workaround for that error:
>
>-Xmx256m -Xms256m
>
>By having the minimum allocation = maximum allocation you're going to get 
>the best performance and the cache will grow to the maximum that it can.
>
>That should take care of the warning messages.
>
>The other thing to be aware of is that searchAndRetrieveList() does NOT 
>cache it's results.  retrieve() DOES however.
>
>HTH!
>                                                 -Mike
>
>_______________________________________________
>Opensource mailing list
>Opensource at jcorporate.com
>http://mail.jcorporate.com/mailman/listinfo/opensource
>Archives: http://mail.jcorporate.com/pipermail/opensource/


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




More information about the Opensource mailing list