ehcache.xml异常。。。which is already used by an existing CacheManager.
09:25:32,312 WARN CacheManager:271 - Creating a new instance of CacheManager using the diskStorePath "/data/ehcache" which is already used by an existing CacheManager.
The source of the configuration was classpath.
The diskStore path for this CacheManager will be set to /data/ehcache\ehcache_auto_created_1283217932312.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
我的配置:
<diskStore path="/data/ehcache" />
<defaultCache maxElementsInMemory="10000"
eternal="false"
overflowToDisk="true"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120" />
<cache name="org.hibernate.cache.UpdateTimestampsCache"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="true" />
<cache name="org.hibernate.cache.StandardQueryCache"
maxElementsInMemory="10000"
eternal="false"
timeToLiveSeconds="120"
overflowToDisk="true" />
很简单不知道老是报那错。。。。呵呵请叫一下大家哈谢谢
The source of the configuration was classpath.
The diskStore path for this CacheManager will be set to /data/ehcache\ehcache_auto_created_1283217932312.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
我的配置:
<diskStore path="/data/ehcache" />
<defaultCache maxElementsInMemory="10000"
eternal="false"
overflowToDisk="true"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120" />
<cache name="org.hibernate.cache.UpdateTimestampsCache"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="true" />
<cache name="org.hibernate.cache.StandardQueryCache"
maxElementsInMemory="10000"
eternal="false"
timeToLiveSeconds="120"
overflowToDisk="true" />
很简单不知道老是报那错。。。。呵呵请叫一下大家哈谢谢
...全文
相关推荐
Ehcache经典中文教程
在程序中,你可以通过以下方式与 Ehcache 交互:```javaCacheManager manager = new CacheManager("ehcache.xml");Cache cache
ehcache.xml
- 方法二:`CacheManager manager = new CacheManager("src/main/resources/ehcache.xml");` 指定配置文件路径,使得 CacheManager
ehcache.xsd_ehcache.xml代码提示.rar
缓存策略:Ehcache支持多种缓存策略,如LRU(Least Recently Used,最近最少使用)、LFU(Least Frequently Used,最不经常使用)以及基于时间的过期策略。
Ehcache使用
示例代码如下: ```java // 使用默认配置文件 ehcache.xml 初始化 CacheManager CacheManager cacheManager = CacheManager.create
Ehcache_Hello
**Ehcache配置**Ehcache的配置可以通过XML或者Java代码完成。在XML配置中,可以定义缓存区的名称、大小、过期策略、持久化方式等。


