Still see SQL in log for cached statements

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Still see SQL in log for cached statements

Warren Bell-2
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Still see SQL in log for cached statements

Clinton Begin

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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]


Loading...