root/head/ambra/webapp/src/main/resources/ehcache.xml @ 7250

Revision 7250, 26.4 KB (checked in by dragisak, 19 months ago)

Add proper XML schema to Ehcache configuration file and ensure that it conforms to it.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id HeadURL Revision
Line 
1<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2         xsi:noNamespaceSchemaLocation="http://ehcache.sf.net/ehcache.xsd">
3
4    <!--
5    Sets the path to the directory where cache files are created.
6
7    If the path is a Java System Property it is replaced by its value in the
8    running VM.
9
10    The following properties are translated:
11    * user.home - User's home directory
12    * user.dir - User's current working directory
13    * java.io.tmpdir - Default temp file path
14
15    Subdirectories can be specified below the property e.g. java.io.tmpdir/one
16    -->
17    <diskStore path="java.io.tmpdir"/>
18
19    <!--
20    Specifies a CacheManagerEventListenerFactory, be used to create a CacheManagerPeerProvider,
21    which is notified when Caches are added or removed from the CacheManager.
22
23    The attributes of CacheManagerEventListenerFactory are:
24    * class - a fully qualified factory class name
25    * properties - comma separated properties having meaning only to the factory.
26
27    Sets the fully qualified class name to be registered as the CacheManager event listener.
28
29    The events include:
30    * adding a Cache
31    * removing a Cache
32
33    Callbacks to listener methods are synchronous and unsynchronized. It is the responsibility
34    of the implementer to safely handle the potential performance and thread safety issues
35    depending on what their listener is doing.
36
37    If no class is specified, no listener is created. There is no default.
38    -->
39    <cacheManagerEventListenerFactory class="" properties=""/>
40
41
42    <!--
43    (Enable for distributed operation)
44
45    Specifies a CacheManagerPeerProviderFactory which will be used to create a
46    CacheManagerPeerProvider, which discovers other CacheManagers in the cluster.
47
48    The attributes of cacheManagerPeerProviderFactory are:
49    * class - a fully qualified factory class name
50    * properties - comma separated properties having meaning only to the factory.
51
52    Ehcache comes with a built-in RMI-based distribution system with two means of discovery of
53    CacheManager peers participating in the cluster:
54    * automatic, using a multicast group. This one automatically discovers peers and detects
55      changes such as peers entering and leaving the group
56    * manual, using manual rmiURL configuration. A hardcoded list of peers is provided at
57      configuration time.
58
59    Configuring Automatic Discovery:
60    Automatic discovery is configured as per the following example:
61    <cacheManagerPeerProviderFactory
62                        class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
63                        properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
64                                    multicastGroupPort=4446"/>
65
66    Valid properties are:
67    * peerDiscovery (mandatory) - specify "automatic"
68    * multicastGroupAddress (mandatory) - specify a valid multicast group address
69    * multicastGroupPort (mandatory) - specify a dedicated port for the multicast heartbeat
70      traffic
71
72    Configuring Manual Discovery:
73    Manual discovery is configured as per the following example:
74    <cacheManagerPeerProviderFactory class=
75                          "net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
76                          properties="peerDiscovery=manual,
77                          rmiUrls=//server1:40000/sampleCache1|//server2:40000/sampleCache1
78                          | //server1:40000/sampleCache2|//server2:40000/sampleCache2"/>
79
80    Valid properties are:
81    * peerDiscovery (mandatory) - specify "manual"
82    * rmiUrls (mandatory) - specify a pipe separated list of rmiUrls, in the form
83                            //hostname:port
84
85    The hostname is the hostname of the remote CacheManager peer. The port is the listening
86    port of the RMICacheManagerPeerListener of the remote CacheManager peer.
87
88    An alternate CacheManagerPeerProviderFactory can be used for JNDI discovery of other
89    CacheManagers in the cluster. Only manual discovery is supported.
90
91    For cacheManagerPeerProviderFactory specify class
92    net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory.
93
94    Correspondingly for cacheManagerPeerListenerFactory specify class
95    net.sf.ehcache.distribution.JNDIRMICacheManagerPeerListenerFactoryory.
96
97    Configuring JNDI Manual Discovery:
98    Manual JNDI discovery is configured as per the following example:
99    <cacheManagerPeerProviderFactory class=
100        "net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory"
101        properties="peerDiscovery=manual, stashContexts=true, stashRemoteCachePeers=true,
102              jndiUrls=t3//server1:40000/sampleCache1|t3//server2:40000/sampleCache1
103              |t3//server1:40000/sampleCache2|t3//server2:40000/sampleCache2"/>
104
105    Valid properties are:
106    * peerDiscovery (mandatory) - specify "manual"
107    * stashContexts (optional) - specify "true" or "false".  Defaults to true.
108      java.naming.Context objects are stashed for performance.
109    * stashRemoteCachePeers (optional) - specify "true" or "false".  Defaults to true.
110      CachePeer objects are stashed for performance.
111    * jndiUrls (mandatory) - specify a pipe separated list of jndiUrls,
112      in the form protocol//hostname:port
113    -->
114    <cacheManagerPeerProviderFactory
115            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
116            properties="peerDiscovery=automatic,
117                        multicastGroupAddress=230.0.0.1,
118                        multicastGroupPort=4446"/>
119
120
121    <!--
122    (Enable for distributed operation)
123
124    Specifies a CacheManagerPeerListenerFactory which will be used to create a
125    CacheManagerPeerListener, which
126    listens for messages from cache replicators participating in the cluster.
127
128    The attributes of cacheManagerPeerListenerFactory are:
129    class - a fully qualified factory class name
130    properties - comma separated properties having meaning only to the factory.
131
132    Ehcache comes with a built-in RMI-based distribution system. The listener component is
133    RMICacheManagerPeerListener which is configured using
134    RMICacheManagerPeerListenerFactory. It is configured as per the following example:
135
136    <cacheManagerPeerListenerFactory
137        class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
138        properties="hostName=fully_qualified_hostname_or_ip,
139                    port=40001,
140                    socketTimeoutMillis=120000"/>
141
142    All properties are optional. They are:
143    * hostName - the hostName of the host the listener is running on. Specify
144      where the host is multihomed and you want to control the interface over which cluster
145      messages are received. Defaults to the host name of the default interface if not
146      specified.
147    * remoteObjectPort - the port number on which the remote objects bound in the registry receive calls.
148                         This defaults to a free port if not specified.
149    * port - the port the listener listens on. This defaults to a free port if not specified.
150    * socketTimeoutMillis - the number of ms client sockets will stay open when sending
151      messages to the listener. This should be long enough for the slowest message.
152      If not specified it defaults 120000ms.
153
154
155    An alternate CacheManagerPeerListenerFactory can be also be used for JNDI binding of
156    listeners for messages from cache replicators participating in the cluster. For
157    cacheManagerPeerListenerFactory specify
158    class net.sf.ehcache.distribution.JNDIRMICacheManagerPeerListenerFactory.
159    Correspondingly for cacheManagerPeerProviderFactory specify class
160    net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory.
161    Properties for JNDIRMICacheManagerPeerListenerFactory are the same as
162    RMICacheManagerPeerListenerFactory.
163
164    -->
165    <cacheManagerPeerListenerFactory
166      class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
167      properties="port=8112,remoteObjectPort=8113"/>
168
169    <!-- Cache configuration.
170
171    The following attributes are required.
172
173    name:
174    Sets the name of the cache. This is used to identify the cache. It must be unique.
175
176    maxElementsInMemory:
177    Sets the maximum number of objects that will be created in memory
178
179    eternal:
180    Sets whether elements are eternal. If eternal,  timeouts are ignored and the
181    element is never expired.
182
183    overflowToDisk:
184    Sets whether elements can overflow to disk when the in-memory cache
185    has reached the maxInMemory limit.
186
187    The following attributes are optional.
188
189    timeToIdleSeconds:
190    Sets the time to idle for an element before it expires.
191    i.e. The maximum amount of time between accesses before an element expires
192    Is only used if the element is not eternal.
193    Optional attribute. A value of 0 means that an Element can idle for infinity.
194    The default value is 0.
195
196    timeToLiveSeconds:
197    Sets the time to live for an element before it expires.
198    i.e. The maximum time between creation time and when an element expires.
199    Is only used if the element is not eternal.
200    Optional attribute. A value of 0 means that and Element can live for infinity.
201    The default value is 0.
202
203    diskPersistent:
204    Whether the disk store persists between restarts of the Virtual Machine.
205    The default value is false.
206
207    diskExpiryThreadIntervalSeconds:
208    The number of seconds between runs of the disk expiry thread. The default value
209    is 120 seconds.
210
211    memoryStoreEvictionPolicy:
212    Policy would be enforced upon reaching the maxElementsInMemory limit. Default
213    policy is Least Recently Used (specified as LRU). Other policies available -
214    First In First Out (specified as FIFO) and Less Frequently Used
215    (specified as LFU)
216
217    Cache elements can also contain sub elements which take the same format of a factory class
218    and properties. Defined sub-elements are:
219
220    * cacheEventListenerFactory - Enables registration of listeners for cache events, such as
221      put, remove, update, and expire.
222
223    * bootstrapCacheLoaderFactory - Specifies a BootstrapCacheLoader, which is called by a
224      cache on initialisation to prepopulate itself.
225
226    Each cache that will be distributed needs to set a cache event listener which replicates
227    messages to the other CacheManager peers. For the built-in RMI implementation this is done
228    by adding a cacheEventListenerFactory element of type RMICacheReplicatorFactory to each
229    distributed cache's configuration as per the following example:
230
231    <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
232         properties="replicateAsynchronously=true,
233         replicatePuts=true,
234         replicateUpdates=true,
235         replicateUpdatesViaCopy=true,
236         replicateRemovals=true "/>
237
238    The RMICacheReplicatorFactory recognises the following properties:
239
240    * replicatePuts=true|false - whether new elements placed in a cache are
241      replicated to others. Defaults to true.
242
243    * replicateUpdates=true|false - whether new elements which override an
244      element already existing with the same key are replicated. Defaults to true.
245
246    * replicateRemovals=true - whether element removals are replicated. Defaults to true.
247
248    * replicateAsynchronously=true | false - whether replications are
249      asynchronous (true) or synchronous (false). Defaults to true.
250
251    * replicateUpdatesViaCopy=true | false - whether the new elements are
252      copied to other caches (true), or whether a remove message is sent. Defaults to true.
253
254
255    The RMIBootstrapCacheLoader bootstraps caches in clusters where RMICacheReplicators are
256    used. It is configured as per the following example:
257
258    <bootstrapCacheLoaderFactory
259        class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
260        properties="bootstrapAsynchronously=true, maximumChunkSizeBytes=5000000"/>
261
262    The RMIBootstrapCacheLoaderFactory recognises the following optional properties:
263
264    * bootstrapAsynchronously=true|false - whether the bootstrap happens in the background
265      after the cache has started. If false, bootstrapping must complete before the cache is
266      made available. The default value is true.
267
268    * maximumChunkSizeBytes=<integer> - Caches can potentially be very large, larger than the
269      memory limits of the VM. This property allows the bootstraper to fetched elements in
270      chunks. The default chunk size is 5000000 (5MB).
271
272    -->
273
274
275    <!--
276    Mandatory Default Cache configuration. These settings will be applied to caches
277    created programmtically using CacheManager.add(String cacheName)
278    -->
279    <defaultCache
280            maxElementsInMemory="10000"
281            eternal="false"
282            timeToIdleSeconds="86400"
283            timeToLiveSeconds="0"
284            overflowToDisk="false"
285            diskPersistent="false"
286            diskExpiryThreadIntervalSeconds="120"
287            memoryStoreEvictionPolicy="LRU">
288        <cacheEventListenerFactory
289                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
290        <bootstrapCacheLoaderFactory
291                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
292    </defaultCache>
293
294    <!--
295    Sample caches. Following are some example caches. Remove these before use.
296    -->
297
298    <!--
299    Sample cache named sampleCache1
300    This cache contains a maximum in memory of 10000 elements, and will expire
301    an element if it is idle for more than 5 minutes and lives for more than
302    10 minutes.
303
304    If there are more than 10000 elements it will overflow to the
305    disk cache, which in this configuration will go to wherever java.io.tmp is
306    defined on your system. On a standard Linux system this will be /tmp"
307    <cache name="sampleCache1"
308           maxElementsInMemory="10000"
309           eternal="false"
310           overflowToDisk="true"
311           timeToIdleSeconds="300"
312           timeToLiveSeconds="600"
313           memoryStoreEvictionPolicy="LFU"
314            />
315    -->
316
317
318    <!--
319    Sample cache named sampleCache2
320    This cache has a maximum of 1000 elements in memory. There is no overflow to disk, so 1000
321    is also the maximum cache size. Note that when a cache is eternal, timeToLive and
322    timeToIdle are not used and do not need to be specified.
323    <cache name="sampleCache2"
324           maxElementsInMemory="1000"
325           eternal="true"
326           overflowToDisk="false"
327           memoryStoreEvictionPolicy="FIFO"
328            />
329    -->
330
331
332    <!--
333    Sample cache named sampleCache3. This cache overflows to disk. The disk store is
334    persistent between cache and VM restarts. The disk expiry thread interval is set to 10
335    minutes, overriding the default of 2 minutes.
336    <cache name="sampleCache3"
337           maxElementsInMemory="500"
338           eternal="false"
339           overflowToDisk="true"
340           timeToIdleSeconds="300"
341           timeToLiveSeconds="600"
342           diskPersistent="true"
343           diskExpiryThreadIntervalSeconds="1"
344           memoryStoreEvictionPolicy="LFU"
345            />
346    -->
347
348
349    <!--
350    Sample distributed cache named sampleDistributedCache1.
351    This cache replicates using defaults.
352    It also bootstraps from the cluster, using default properties.
353    <cache name="sampleDistributedCache1"
354           maxElementsInMemory="10"
355           eternal="false"
356           timeToIdleSeconds="100"
357           timeToLiveSeconds="100"
358           overflowToDisk="false">
359        <bootstrapCacheLoaderFactory
360                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
361        <cacheEventListenerFactory
362                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
363    </cache>
364
365    -->
366
367    <!--
368    Sample distributed cache named sampleDistributedCache2.
369    This cache replicates using specific properties.
370    It only replicates updates and does so synchronously via copy
371    <cache name="sampleDistributedCache2"
372           maxElementsInMemory="10"
373           eternal="false"
374           timeToIdleSeconds="100"
375           timeToLiveSeconds="100"
376           overflowToDisk="false">
377        <cacheEventListenerFactory
378                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
379                properties="replicateAsynchronously=false, replicatePuts=false,
380                            replicateUpdates=true, replicateUpdatesViaCopy=true,
381                            replicateRemovals=false"/>
382    </cache>
383    -->
384    <!--
385    permission-grants cache.
386    This cache replicates using defaults.
387    It also bootstraps from the cluster, using default properties.
388    -->
389    <cache name="permission-grants"
390           maxElementsInMemory="10000"
391           eternal="true"
392           timeToIdleSeconds="1800"
393           timeToLiveSeconds="1800"
394           memoryStoreEvictionPolicy="LFU"
395           overflowToDisk="true">
396        <cacheEventListenerFactory
397                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
398        <bootstrapCacheLoaderFactory
399                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
400    </cache>
401    <!--
402    permission-revokes cache.
403    This cache replicates using defaults.
404    It also bootstraps from the cluster, using default properties.
405    -->
406    <cache name="permission-revokes"
407           maxElementsInMemory="10000"
408           eternal="true"
409           timeToIdleSeconds="1800"
410           timeToLiveSeconds="1800"
411           memoryStoreEvictionPolicy="LFU"
412           overflowToDisk="true">
413        <cacheEventListenerFactory
414                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
415        <bootstrapCacheLoaderFactory
416                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
417    </cache>
418
419    <!--
420    permit-admin XACML cache.
421    This cache replicates using defaults.
422    It also bootstraps from the cluster, using default properties.
423    -->
424    <cache name="permit-admin"
425           maxElementsInMemory="10000"
426           eternal="true"
427           timeToIdleSeconds="1800"
428           timeToLiveSeconds="1800"
429           memoryStoreEvictionPolicy="LFU"
430           overflowToDisk="true">
431        <cacheEventListenerFactory
432                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
433        <bootstrapCacheLoaderFactory
434                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
435    </cache>
436    <!--
437    permit-creator XACML cache.
438    This cache replicates using defaults.
439    It also bootstraps from the cluster, using default properties.
440    -->
441    <cache name="permit-creator"
442           maxElementsInMemory="10000"
443           eternal="true"
444           timeToIdleSeconds="1800"
445           timeToLiveSeconds="1800"
446           memoryStoreEvictionPolicy="LFU"
447           overflowToDisk="true">
448        <cacheEventListenerFactory
449                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
450        <bootstrapCacheLoaderFactory
451                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
452    </cache>
453    <!--
454    permit-bootstrap XACML cache.
455    This cache replicates using defaults.
456    It also bootstraps from the cluster, using default properties.
457    -->
458    <cache name="permit-bootstrap"
459           maxElementsInMemory="10000"
460           eternal="true"
461           timeToIdleSeconds="1800"
462           timeToLiveSeconds="1800"
463           memoryStoreEvictionPolicy="LFU"
464           overflowToDisk="true">
465        <cacheEventListenerFactory
466                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
467        <bootstrapCacheLoaderFactory
468                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
469    </cache>
470    <!--
471    article-state XACML cache.
472    This cache replicates using defaults.
473    It also bootstraps from the cluster, using default properties.
474    -->
475    <cache name="article-state"
476           maxElementsInMemory="10000"
477           eternal="true"
478           timeToIdleSeconds="1800"
479           timeToLiveSeconds="1800"
480           memoryStoreEvictionPolicy="LFU"
481           overflowToDisk="true">
482        <cacheEventListenerFactory
483                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
484        <bootstrapCacheLoaderFactory
485                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
486    </cache>
487    <!--
488    VirtualJournalMappingFilter directory cache.
489    This cache replicates using defaults.
490    It also bootstraps from the cluster, using default properties.
491    -->
492    <cache name="VirtualJournalMappingFilter"
493           maxElementsInMemory="10000"
494           eternal="true"
495           timeToIdleSeconds="1800"
496           timeToLiveSeconds="1800"
497           memoryStoreEvictionPolicy="LFU"
498           overflowToDisk="true">
499        <cacheEventListenerFactory
500                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
501        <bootstrapCacheLoaderFactory
502                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
503    </cache>
504    <!--
505    Journal cache.
506    This cache replicates using defaults.
507    It also bootstraps from the cluster, using default properties.
508    -->
509    <cache name="Journals"
510           maxElementsInMemory="10000"
511           eternal="true"
512           timeToIdleSeconds="1800"
513           timeToLiveSeconds="1800"
514           memoryStoreEvictionPolicy="LFU"
515           overflowToDisk="false">
516        <cacheEventListenerFactory
517                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
518        <bootstrapCacheLoaderFactory
519                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
520    </cache>
521    <!--
522    Article-carriers cache.
523    This cache replicates using defaults.
524    It also bootstraps from the cluster, using default properties.
525    -->
526    <cache name="ArticleCarriers"
527           maxElementsInMemory="10000"
528           eternal="true"
529           timeToIdleSeconds="1800"
530           timeToLiveSeconds="1800"
531           memoryStoreEvictionPolicy="LFU"
532           overflowToDisk="true">
533        <cacheEventListenerFactory
534                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
535        <bootstrapCacheLoaderFactory
536                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
537    </cache>
538
539    <!--
540      ArticleAnnotationCache.
541      This cache stores Article(transformed)/ArticleInfo/Annotation/Citation.
542      All Objects are Serializable:
543        - bootstrap on creation
544        - replicate puts & updates
545    -->
546    <cache name="ArticleAnnotationCache"
547           maxElementsInMemory="20000"
548           eternal="true"
549           timeToIdleSeconds="1800"
550           timeToLiveSeconds="1800"
551           memoryStoreEvictionPolicy="LFU"
552           overflowToDisk="true">
553        <cacheEventListenerFactory
554                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
555        <bootstrapCacheLoaderFactory
556                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
557    </cache>
558    <!--
559      User cache.
560      This cache stores user information.
561    -->
562    <cache name="UserCache"
563           maxElementsInMemory="10000"
564           eternal="false"
565           timeToIdleSeconds="86400"
566           timeToLiveSeconds="0"
567           memoryStoreEvictionPolicy="LFU"
568           overflowToDisk="true">
569        <cacheEventListenerFactory
570                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
571        <bootstrapCacheLoaderFactory
572                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
573    </cache>
574    <!--
575    Browse cache
576    This cache stores browse information
577    -->
578    <cache name="BrowseCache"
579           maxElementsInMemory="10000"
580           eternal="true"
581           timeToIdleSeconds="1800"
582           timeToLiveSeconds="1800"
583           memoryStoreEvictionPolicy="LFU"
584           overflowToDisk="true">
585        <cacheEventListenerFactory
586                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
587        <bootstrapCacheLoaderFactory
588                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
589    </cache>
590    <!--
591    Article Feed cache
592    This cache stores rss feeds
593    An entire feed could be quite big (~100k), but guess 2-5K is average?
594    -->
595    <cache name="FeedCache"
596           maxElementsInMemory="10000"
597           eternal="false"
598           timeToIdleSeconds="0"
599           timeToLiveSeconds="82800"
600           memoryStoreEvictionPolicy="LFU"
601           overflowToDisk="true">
602        <cacheEventListenerFactory
603                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
604        <bootstrapCacheLoaderFactory
605                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
606    </cache>
607    <!--
608    Article Search results cache.
609    -->
610    <cache name="SearchCache"
611           maxElementsInMemory="10000"
612           eternal="false"
613           timeToIdleSeconds="0"
614           timeToLiveSeconds="600"
615           memoryStoreEvictionPolicy="LFU"
616           overflowToDisk="false">
617    </cache>
618    <!--
619    OTM Second-Level cache. Lots of entries. count(subject-id) * (count(journals) + 1)
620    This cache replicates using defaults.
621    It also bootstraps from the cluster, using default properties.
622    -->
623    <cache name="ObjectCache"
624           maxElementsInMemory="30000"
625           eternal="true"
626           timeToIdleSeconds="1800"
627           timeToLiveSeconds="1800"
628           memoryStoreEvictionPolicy="LFU"
629           overflowToDisk="true">
630        <cacheEventListenerFactory
631                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
632        <bootstrapCacheLoaderFactory
633                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
634    </cache>
635    <!--
636    Ambra cache for small binary object. Size of objects that qualifies for caching is defined in
637    ambra.cache.smallBlobSize configuration parameter.
638    This cache does not replicate or bootstrap from peers. But changes are
639    notified to the peers. (eg. from re-ingest or delete of Articles).
640    This is also not an eternal cache. That was done to make sure that
641    the cache doesn't fill up the disk with blobs. An idle timeout
642    is added so that frequently used blobs will always remain in cache.
643    Adjust this timer to control the size of the cache.
644    -->
645    <cache name="SmallBlobCache"
646           maxElementsInMemory="2000"
647           eternal="false"
648           timeToIdleSeconds="10800"
649           timeToLiveSeconds="0"
650           memoryStoreEvictionPolicy="LFU"
651           overflowToDisk="true"
652           diskPersistent="false">
653        <cacheEventListenerFactory
654                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
655                properties="replicatePuts=false,replicateUpdatesViaCopy=false"/>
656    </cache>
657</ehcache>
Note: See TracBrowser for help on using the browser.