ehcache.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!-- for ehcache 2.x -->
  2. <ehcache updateCheck="false" dynamicConfig="false">
  3. <diskStore path="java.io.tmpdir"/>
  4. <cacheManagerEventListenerFactory class="" properties=""/>
  5. <!--Default Cache configuration. These will applied to caches programmatically created through
  6. the CacheManager.
  7. The following attributes are required for defaultCache:
  8. maxInMemory - Sets the maximum number of objects that will be created in memory
  9. eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
  10. is never expired.
  11. timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
  12. if the element is not eternal. Idle time is now - last accessed time
  13. timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
  14. if the element is not eternal. TTL is now - creation time
  15. overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
  16. has reached the maxInMemory limit.
  17. -->
  18. <defaultCache
  19. maxElementsInMemory="1000"
  20. eternal="false"
  21. timeToIdleSeconds="60"
  22. timeToLiveSeconds="120"
  23. overflowToDisk="true">
  24. </defaultCache>
  25. <!--Predefined caches. Add your cache configuration settings here.
  26. If you do not have a configuration for your cache a WARNING will be issued when the
  27. CacheManager starts
  28. The following attributes are required for defaultCache:
  29. name - Sets the name of the cache. This is used to identify the cache. It must be unique.
  30. maxInMemory - Sets the maximum number of objects that will be created in memory
  31. eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
  32. is never expired.
  33. timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
  34. if the element is not eternal. Idle time is now - last accessed time
  35. timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
  36. if the element is not eternal. TTL is now - creation time
  37. overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
  38. has reached the maxInMemory limit.
  39. -->
  40. <cache name="example"
  41. maxElementsInMemory="5000"
  42. eternal="false"
  43. timeToIdleSeconds="1800"
  44. timeToLiveSeconds="1800"
  45. overflowToDisk="false"
  46. >
  47. </cache>
  48. </ehcache>