ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Cache
Date Mon, 20 Feb 2006 04:07:07 GMT
Yeah...this is almost a bug, but not quite..the assumption is that if
you have no parameters that the query must change based on something
else, so it doesn't get cached. :-/

A workaround (I think..) is to call the query with a parameter object
that you ignore.

Object o = sqlmap.queryForList("ns.query", "ignoreMe");

Larry

On 2/19/06, Yusuf <Yusuf@ekalife.co.id> wrote:
> Hi,
> I was wondering about the cache feature in ibatis, i hope this isnt a
> stupid question:
>
>         <cacheModel id="cache.references" type="LRU" readOnly="true"
>                 serialize="false">
>                 <flushInterval hours="8" />
>                 <property name="cache-size" value="100" />
>         </cacheModel>
>
>         <select id="selectTest" resultClass="map"
> cacheModel="cache.references">
>                 select * from dual
>         </select>
>
> I have a cache setting like above, but if i use log4j to log the query,
> it seems that it always query again to database.. is there something
> wrong with my config?
>
> Thanks,
> Yusuf S.
>
>

Mime
View raw message