[ACCEPTED]-ehcache warning message " No configuration found-ehcache
ehcache.xml
should be introduced in your classpath
and specifically 4 in WEB-INF/classes/
. Then, you can specify your needs in 3 it according to your environment.
This is 2 an example:
<?xml version="1.0" encoding="UTF-8"?>
<ehcache>
<diskStore path="java.io.tmpdir"/>
<cache name="org.hibernate.cache.UpdateTimestampsCache"
maxElementsInMemory="50000"
eternal="true"
overflowToDisk="true"/>
<cache name="org.hibernate.cache.StandardQueryCache"
maxElementsInMemory="50000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"
/>
<defaultCache
maxElementsInMemory="50000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"
/>
</ehcache>
After 3 years, hope that my response 1 can help others.
Loading ehcache-failsafe.xml
doesn't cause a problem per se; however 9 it most likely isn't optimal for your application.
There's 8 no way for EhCache developers to know what 7 you intend to cache; thus ehcache-failsafe.xml
included in distribution 6 attempts to provide some "lowest common 5 denominator" settings that would work more 4 or less OK in most cases. You get a warning 3 as a reminder to specify configuration that 2 would be more appropriate for your specific 1 needs.
If you re using Ehcache as a second level 4 cache provider for hibernate change : hibernate.cache.provider_configuration_file_resource_path 3 with net.sf.ehcache.configurationResourceName 2 Ehcache will be able to find your configuration 1 then.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.