ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: iBATIS caching
Date Tue, 10 Apr 2007 17:13:22 GMT
iBATIS caches by statement, so you are correct that you would need some
higher level cache to accomplish what you want to do.  iBATIS does not
attempt to understand your table structures and does not know about object

Jeff Butler

On 4/10/07, Brendan.McKenna@mdsuk.com <Brendan.McKenna@mdsuk.com> wrote:
> Hi,
>        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
> something?
>                        Thanks,
>                                Brendan

View raw message