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
请高手指点一二.
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
请高手指点一二.
解决方案 »
- 求教:关于数据库插入错误You have an error in your SQL syntax;
- 使用Jboss做服务器的时,MyEclipse工作空间指定在那里?
- JAVA在B/S项目中怎样实现打印功能?
- SPRING配置文件出错的问题
- Servlet中用forward将参数传递到jsp页面后,新页面怎么就没有了CSS的效果?
- 我有个问题eclipse+hibernate+spring+struts
- hibernate delete问题
- C#,C#小程序,简单一点的
- validation框架验证和错误显示的问题
- gson解析字符串问题,大家都会遇到的
- tt猫来。。
- Hibernate配置文件的疑问
http://hnylj.javaeye.com/blog/363066