ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <Larry.Mead...@plumcreek.com>
Subject Re: Some Caching Model questions
Date Sat, 27 Nov 2004 04:14:30 GMT
The connections are not related to the cache at all, so I guess the
answer is yes. :-)

In the second question, if the cache expires before the user requests
the data, iBATIS will get it fresh from the database. If the user
requests it before the expiration, they will get it from the cache. If
they have a copy after it expires, it is up to you as a developer to
provide a way for that to get updated.

Generally, in a web application, I do not keep copies of data for more
than the lifecycle of a request. That way, if the user is looking at a
page, then the cache expires, then they refreh that page, they see the
new data.

Larry

PS: I like beginner questions, they are not stupid, and they help us
make sure that our docs cover things that new users need to know. Keep
them coming ... but be sure to RTFM, too. ;-)

>>> Luk Meng Soon <lmengsoon@gmail.com> 11/26/04 2:28 AM >>>
Hi all,

I have 2 queries about the cache model.

i.e:
   <cache-model name="oneDayProduct" reference-type="WEAK"
readOnly="true">
        <flush-interval hours="24"/>
     </cache-model>

   <statement id="getProductList" cacheModel="product-cache">
        select * from PRODUCT where PRD_CAT_ID = #value#
   </statement>

1. During the flushing of cache, does IBatis automatically release the
jdbc connections?
Else, the conections might get eaten up every day ...


2. Since my readOnly flag is set to true and if the flushing interval
24 hours is up, will there be any synchronization issue issue? i.e: A
user logs in at 23:59 hours, will he be viewing the correct product
list at 00:02 hours assuming that the product list is being flushed at
00:00 hours?


Sorry, I am a new IBatis user so pardon me if I ask stupid questions.
Thanks.


Meng Soon


Mime
View raw message