</ehcache>
<cache name="online_user_cache" maxElementsInMemory="200" eternal="true" overflowToDisk="true"/>
<cache name="jdbc_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="jdbc_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="jdbc_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="online_user_cache" maxElementsInMemory="200" eternal="true" overflowToDisk="true"/>
<cache name="jdbc_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<cache name="online_user_cache" maxElementsInMemory="200" eternal="true" overflowToDisk="true"/>
<cache name="jdbc_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>
</ehcache>
<cache name="online_user_cache" maxElementsInMemory="200" eternal="true" overflowToDisk="true"/>
<cache name="jdbc_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="logger_cache" maxElementsInMemory="1000" eternal="true" overflowToDisk="true"/>
<cache name="task_scheduled" maxElementsInMemory="50" eternal="true" overflowToDisk="true"/>
</cache>
replicatePuts=false,replicateUpdates=false,replicateRemovals=false"/>
properties="replicateAsynchronously=true,replicateUpdatesViaCopy=false,
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
<cache name="security_resource" maxElementsInMemory="500" eternal="true" overflowToDisk="true">
所以replicatePuts要设为false。 -->
replicatePuts、replicateUpdates、replicateRemovals增删改是否同步,默认都为true。但因为我们前面选择了失效算法,
如果业务上真的需要设为true时,就可考虑使用Terracotta了。
默认为true。鉴于对象复制的消耗挺大的,又有锁的问题,而且对方也未必需要该对象,所以此属性建议设为false。
replicateUpdatesViaCopy 是否将对象变更复制到所有节点,还是只是发送一个失效信息,让对方该缓存失效,当对方需要该缓存时重新计算载入。
在一致性时间性要求不强的时候,设为异步可大大提供性能,因为它是异步立即返回的,而且可以批量提交。
<!-- replicateAsynchronously对象同步是否异步完成,默认为true。如果比较紧急就设为false。
</defaultCache>
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
timeToIdleSeconds="3600" timeToLiveSeconds="100000" diskPersistent="false">
memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000" diskExpiryThreadIntervalSeconds="600"
<defaultCache maxElementsInMemory="10000" overflowToDisk="true" eternal="false"
timeToIdleSeconds="清理多少秒不使用的对象" timeToLiveSeconds="清理创建多少秒的对象" diskPersistent="重启内存对象持久化入磁盘" /> -->
memoryStoreEvictionPolicy="LRU优先清除不经常使用的对象" maxElementsOnDisk="磁盘对象数量" diskExpiryThreadIntervalSeconds="访问磁盘线程活动时间"
<!-- <defaultCache maxElementsInMemory="内存对象数量" overflowToDisk="内存满后是否存磁盘" eternal="对象永不过期"
rmiUrls=//127.0.0.1:40002/security_resource"/>
properties="peerDiscovery=manual,
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
<!-- |//192.168.1.其他集群服务器IP:40002/security_resource"/> -->
properties="hostName=127.0.0.1,port=40001,socketTimeoutMillis=2000" />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
<!-- 设置自身 -->
<diskStore path="java.io.tmpdir/ehcache-wisdom" />
updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"
<?xml version="1.0" encoding="UTF-8"?>