<?xml version="1.0" encoding="UTF-8"?>
|
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
|
|
<!--磁盘缓存的地址 -->
|
<diskStore path="java.io.tmpdir/ehcache" /><!-- 达到内存上限后缓存文件保存位置 -->
|
|
<!-- <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
|
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446,
|
timeToLive=32" /> -->
|
|
<!-- timeToLive 0是限制在同一个服务器 1是限制在同一个子网 32是限制在同一个网站 64是限制在同一个region 128是限制在同一个大洲
|
255是不限制 -->
|
|
|
<!-- 默认缓存 -->
|
<defaultCache maxElementsInMemory="1000" eternal="false"
|
maxElementsOnDisk="10000" timeToIdleSeconds="120" timeToLiveSeconds="120"
|
overflowToDisk="false" />
|
|
|
|
<!-- 配置文件缓存 -->
|
<cache name="configCache" maxElementsInMemory="1000"
|
maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
timeToLiveSeconds="120" overflowToDisk="true"
|
memoryStoreEvictionPolicy="LRU" />
|
|
</ehcache>
|