修改ehcache配置文件

This commit is contained in:
shuzheng 2016-10-18 17:30:45 +08:00
parent 038e018eab
commit 4faea5d5ba
2 changed files with 12 additions and 2 deletions

View File

@ -13,7 +13,7 @@
<!-- cache管理器配置 --> <!-- cache管理器配置 -->
<bean id="cacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> <bean id="cacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation" value="classpath:ehcache-common.xml"/> <property name="configLocation" value="classpath:ehcache.xml"/>
</bean> </bean>
<!-- 默认是cacheManager --> <!-- 默认是cacheManager -->

View File

@ -2,8 +2,18 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"> xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
<diskStore path="java.io.tmpdir"/> <diskStore path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
maxElementsOnDisk="10000000"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
<persistence strategy="localTempSwap"/>
</defaultCache>
<cache <cache
name="ehcache_common" name="ehcache"
eternal="false" eternal="false"
timeToIdleSeconds="120" timeToIdleSeconds="120"
timeToLiveSeconds="300" timeToLiveSeconds="300"