You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Warren Bell <wa...@gmail.com> on 2010/05/24 21:11:48 UTC

Still see SQL in log for cached statements

I am still seeing SQL  for statements that should be cached when I turn 
logging on. Is that normal? And if so how do I know the cache is working?

My cache configuration:

    <cacheModel id="storeCache" type ="LRU" readOnly="false" 
serialize="false">
        <flushInterval minutes="30"/>
        <property name="cache-size" value="10" />
    </cacheModel>

-- 
Thanks,

Warren Bell


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: Still see SQL in log for cached statements

Posted by Clinton Begin <cl...@gmail.com>.
With a read/write cache that is NOT serializable, it sort of eliminates any
benefit of caching.  This was a little confusing in iBATIS 2... but the only
settings that really make sense together are:

readOnly="true" serializable="false"
readOnly="false" serializable="true"

The first one is the default, so really only the second one is ever
necessary to specify.  Not the best, but a consequence of some evolution
that happened within the 2.x version over the last 6 years or so.  3.0
cleans this up a lot.

Be sure to start using the new user group:
http://code.google.com/p/mybatis/wiki/DocIbatis2MyBatis

Cheers,
Clinton


On Mon, May 24, 2010 at 1:11 PM, Warren Bell <wa...@gmail.com> wrote:

> I am still seeing SQL  for statements that should be cached when I turn
> logging on. Is that normal? And if so how do I know the cache is working?
>
> My cache configuration:
>
>   <cacheModel id="storeCache" type ="LRU" readOnly="false"
> serialize="false">
>       <flushInterval minutes="30"/>
>       <property name="cache-size" value="10" />
>   </cacheModel>
>
> --
> Thanks,
>
> Warren Bell
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>