ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan.McKe...@mdsuk.com
Subject iBATIS caching
Date Tue, 10 Apr 2007 16:22:23 GMT

        Based on a few experiments I've run and looking at iBATIS' source 
code, it appears that iBATIS caches the results of queries separately -- 
meaning that separate queries have their results cached separately, even 
if they share the same cache model.  What I'd like to be able to do is to 
pre-populate my cache (particularly for some of our reference tables) by 
using selects that pull the entire contents of a table into cache, and 
then serve other queries, which may be requesting one or more of the rows 
of these tables, from the cache without having to go to the database.  Is 
this possible?

        In looking at the construction of CacheKey instances in the 
debugger, I can see that the statement name and the text of the prepared 
statement used to query the database are contained in the key, which leads 
me to believe that I would have to build my own caching mechanism to 
support this sort of mechanism, rather than being able to rely on iBATIS' 
caching to take care of this for me.  Is that true, or have I missed 



View raw message