Advertisement
Guest User

Ehcache configuration

a guest
Sep 6th, 2016
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.79 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.     xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
  4.     updateCheck="false" monitoring="autodetect" dynamicConfig="false">
  5.  
  6.     <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"/>
  7.  
  8.     <cache name = "EntitiesCacheRegion"
  9.         maxEntriesLocalHeap="100000"
  10.         eternal="true"
  11.         timeToIdleSeconds="0"
  12.         timeToLiveSeconds="0"
  13.         overflowToDisk="false"
  14.         diskPersistent="false"
  15.         memoryStoreEvictionPolicy="LRU">
  16.         <cacheEventListenerFactory
  17.             class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
  18.             properties="replicateAsynchronously=true, replicatePuts=false,
  19.                 replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"/>
  20.     </cache>
  21.  
  22.     <cache name = "org.hibernate.cache.internal.StandardQueryCache"
  23.         maxEntriesLocalHeap="100000"
  24.         eternal="true"
  25.         timeToIdleSeconds="0"
  26.         timeToLiveSeconds="0"
  27.         overflowToDisk="false"
  28.         diskPersistent="false"
  29.         memoryStoreEvictionPolicy="LRU">
  30.         <!-- Cache invalidation will happen based on the timestamps value, so the replication can be disabled -->
  31.     </cache>
  32.  
  33.     <cache name = "org.hibernate.cache.spi.UpdateTimestampsCache"
  34.         maxEntriesLocalHeap="1000"
  35.         eternal="true"
  36.         overflowToDisk="false"
  37.         diskPersistent="false">
  38.         <!-- replicatePuts and replicateUpdatesViaCopy must be set to true
  39.         because timestamps should be copied for QueryCache to work correctly -->
  40.         <cacheEventListenerFactory
  41.             class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
  42.             properties="replicateAsynchronously=true, replicatePuts=true,
  43.                 replicateUpdates=true, replicateUpdatesViaCopy=true, replicateRemovals=true"/>
  44.     </cache>
  45.  
  46. </ehcache>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement