ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: To monitor used cache model size
Date Sat, 23 Sep 2006 13:48:16 GMT
With readOnly="true" and serialize="false", you are only going to
cache within the current session, and the cache will be mutable. If
you want longer cache life, make serialize="true".

Also, you may want to just use the MEMORY cache, and set the reference
type to HARD. That will keep everything in memory even after a GC.


On 9/22/06, Zhao, Qintao (Contractor) <qintao_zhao@fanniemae.com> wrote:
> All,
> I have a requirement to monitor the cache size used by a cache model. Say I
> have the following cache model defined in a SqlMap,
> <cacheModel id="MDC_PRFL-cache" type="LRU" readOnly="true"
> serialize="false">
> <flushInterval hours="168" />
> <property name="cache-size" value="2000" />
> </cacheModel>
> I would like to know the actual size used by cache during runtime.  Could
> someone help me out ?  We want to make sure the cache is
> big enough to hold all cached objects in the future.
> thanks a lot,
> Qintao

View raw message