【发布时间】:2010-10-30 22:37:17
【问题描述】:
从我的sql日志文件来看,我认为QueryCache的物理属性是由元素配置的:
<defaultCache
maxElementsInMemory="0"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
甚至我在 ehcache.xml 中添加了另一个元素,从 sql 日志看来,QueryCache 的物理属性仍然由 配置元素。
<cache name="org.hibernate.cache.QueryCache"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
我只想在内存中启用 QueryCache,同时默认禁用其他(在内存中)。可能 元素的 name 属性不正确?我从书复制它。或者,我应该使用除 之外的其他元素吗?也许有某种元素?
谢谢。
【问题讨论】:
标签: java xml hibernate ehcache second-level-cache