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 Carl Brodeur <ca...@modelio.com> on 2005/01/11 02:51:46 UTC
Is the cache working ?
Hi:
is there any debug trace that indicates if the cache is working ? I
have configured a cache (see below):
<cacheModel id="ExternalSystem-cache" type="MEMORY"
readOnly="true" serialize="false">
<flushInterval minutes="15"/>
<property name="reference-type" value="STRONG"/>
</cacheModel>
<statement id="findById" resultMap="defaultResult"
parameterClass="java.lang.String" cacheModel="ExternalSystem-cache">
select * from ExternalSystem where ID=#value#
</statement>
.. and in debug mode I still get trace like below:
2005.01.10 20:33:46,378 [main] DEBUG java.sql.PreparedStatement
(PreparedStatementLogProxy.java:45) - {pstm-100008}
PreparedStatement: select * from ExternalSystem where ID=?
2005.01.10 20:33:46,378 [main] DEBUG java.sql.PreparedStatement
(PreparedStatementLogProxy.java:46) - {pstm-100008} Parameters: [DISN]
2005.01.10 20:33:46,378 [main] DEBUG java.sql.PreparedStatement
(PreparedStatementLogProxy.java:47) - {pstm-100008} Types:
[java.lang.String]
Is it possible that the cache is NOT working in this particular case ?
Re: Is the cache working ?
Posted by Clinton Begin <cl...@gmail.com>.
Anything is possible. Are the object references equal? (obj1 == obj2)
Clinton
On Mon, 10 Jan 2005 20:51:46 -0500, Carl Brodeur
<ca...@modelio.com> wrote:
>
>
> Hi:
>
> is there any debug trace that indicates if the cache is working ? I
> have configured a cache (see below):
>
> <cacheModel id="ExternalSystem-cache" type="MEMORY"
> readOnly="true" serialize="false">
> <flushInterval minutes="15"/>
> <property name="reference-type" value="STRONG"/>
> </cacheModel>
>
> <statement id="findById" resultMap="defaultResult"
> parameterClass="java.lang.String" cacheModel="ExternalSystem-cache">
> select * from ExternalSystem where ID=#value#
> </statement>
>
> .. and in debug mode I still get trace like below:
>
> 2005.01.10 20:33:46,378 [main] DEBUG java.sql.PreparedStatement
> (PreparedStatementLogProxy.java:45) - {pstm-100008}
> PreparedStatement: select * from ExternalSystem where ID=?
> 2005.01.10 20:33:46,378 [main] DEBUG java.sql.PreparedStatement
> (PreparedStatementLogProxy.java:46) - {pstm-100008} Parameters: [DISN]
> 2005.01.10 20:33:46,378 [main] DEBUG java.sql.PreparedStatement
> (PreparedStatementLogProxy.java:47) - {pstm-100008} Types:
> [java.lang.String]
>
> Is it possible that the cache is NOT working in this particular case ?
>
>