ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sven.Boden" <list...@pandora.be>
Subject Caching question (reply on JIRA-180)
Date Tue, 09 Aug 2005 10:04:58 GMT

If you're not sure it's a bug don't make a JIRA request of it, ask it on the mailing lists
first. So I would suggest to close this JIRA request.

Now for your question (via the mailing list): 
- A hunch... only the objects returned from the database are cached, so if you would have
different values for #value# only the values you asked before would be in the cache. Alternatively
the flushing could occur when you execute other database/iBATIS statements after your selection
which causes the cache to flush (dependent on your iBATIS setup, normally you would flush
on update/insert in dependent tables).
- A cache is not meant as database replacement, iBATIS assumes the database is still up and
running behind the cache.

If my hunch is not correct, can you provide more specific information on your problem.

Sven Boden

>----- Oorspronkelijk bericht -----
>Van: gopal.narayanan (JIRA) [mailto:ibatis-dev@incubator.apache.org]
>Verzonden: dinsdag, augustus 9, 2005 03:55 AM
>Aan: ibatis-dev@incubator.apache.org
>Onderwerp: [jira] Created: (IBATIS-180) Caching question
>Caching question
>         Key: IBATIS-180
>         URL: http://issues.apache.org/jira/browse/IBATIS-180
>     Project: iBatis for Java
>        Type: Bug
>    Versions: 2.1.0    
> Environment: jdk1.4.2, windows xp
>    Reporter: gopal.narayanan
>I am not sure this is a bug.
>I am trying to use ibatis caching.
>Sql statements which do not have any parameters eg 
>    select fname,lname from users
>seem to work well under caching.
>This is how I tested, after the 1st call to the sql, the db was shutdown, the next call
returned the data from the cache. The time to fetch was considerably lower, indicating that
data was from the cache.
>But this test failed when the sql stmt was of the form 
>select fname,lname from users where lname = #value#
>It seemed that it always need a db connection ( seems like the cache is flushed always)
>Is that so? In that case can we not use ibatis caching?
>This message is automatically generated by JIRA.
>If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
>For more information on JIRA, see:
>   http://www.atlassian.com/software/jira

View raw message