gpt4 book ai didi

java - 如何在ehcache.xml中配置QueryCache

转载 作者:行者123 更新时间:2023-12-01 17:40:44 25 4
gpt4 key购买 nike

从我的 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 属性不正确?我是从书上抄来的<>。或者,我应该使用除 之外的其他元素吗?也许有某种元素?

谢谢。

最佳答案

尝试:名称=“org.hibernate.cache.StandardQueryCache”

关于java - 如何在ehcache.xml中配置QueryCache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/943888/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com