sqlMapConfig:<settings cacheModelsEnabled="true" statementCachingEnabled="true" enhancementEnabled="true"
lazyLoadingEnabled="true" errorTracingEnabled="true"
useStatementNamespaces="true" />
sqlMap:<cacheModel id="indCache" type ="OSCACHE" > 
        <flushInterval hours="24"/> 
  </cacheModel>
<select id="getHistory" parameterClass="java.util.HashMap" resultClass="Ind" cacheModel="indCache">
select ..
  </select>
  
</sqlMap>
oscache.properties:cache.memory=true
cache.key=_oscache_cache
cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
cache.capacity=1000
控制台输出:
[DEBUG] 2011-01-13 16:00:30,765 [btpool0-1] com.ibatis.sqlmap.engine.cache.CacheModel - Cache 'Ind.indCache': cache miss
[DEBUG] 2011-01-13 16:02:23,218 [btpool0-1] com.ibatis.sqlmap.engine.cache.CacheModel - Cache 'Ind.indCache': stored object 'com.studio.domain.Ind@b37df5, com.studio.domain.Ind@129aa7, com.studio.domain.Ind@1677e4b, com.studio.domain.Ind@19496a7, com.ihandy.yuncai.studio....'
[DEBUG] 2011-01-13 16:07:36,531 [btpool0-1] com.ibatis.sqlmap.engine.cache.CacheModel - Cache 'Ind.indCache': cache miss
[DEBUG] 2011-01-13 16:09:29,015 [btpool0-1] com.ibatis.sqlmap.engine.cache.CacheModel - Cache 'Ind.indCache': stored object 'com.studio.domain.Ind@deda0b, com.studio.domain.Ind@bd286c, com.studio.domain.Ind@a8d724, com.studio.domain.Ind@c4925d, com.ihandy.yuncai.studio.mo...'每次访问都是cache miss
请高手指点一二.