ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wuxi_root-...@yahoo.com
Subject IBatis Cache Model
Date Sat, 30 Aug 2008 03:04:24 GMT
Hello,  I would like to know how this particular ibatis cache model works.   I have this cache

<cacheModel id=alertCache" type="LRU" readOnly="true" serialize="false">
            <flushInterval hours="60" />
        <property name="cache-size" value="2000" />

<select id="getAlert" parameterClass=com.co.net.AlertInfo"
    resultMap="alertMap" cacheModel="alerttCache">
     select blah blah goes here...............

My domain object is AlertInfo.  Does this mean that 2000 unique objects of AlertInfo will
be stored in cache for up to 60 hours?    If I query for an object of AlertInfo, Ibatis will
hit the cache first.  If it is not there, then fetch it from the DB.    It should not issue
a query when IBatis looks for it in the cache.   But I saw Ibatis issues a query when I turned
on debug.      Is my understadning wrong?  Thank you
View raw message