ehcache-failsafe.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <ehcache>
  2. <!-- Sets the path to the directory where cache .data files are created.
  3. If the path is a Java System Property it is replaced by
  4. its value in the running VM.
  5. The following properties are translated:
  6. user.home - User's home directory
  7. user.dir - User's current working directory
  8. java.io.tmpdir - Default temp file path -->
  9. <diskStore path="java.io.tmpdir"/>
  10. <!--Default Cache configuration. These will applied to caches programmatically created through
  11. the CacheManager.
  12. The following attributes are required:
  13. maxElementsInMemory - Sets the maximum number of objects that will be created in memory
  14. eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
  15. element is never expired.
  16. overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
  17. has reached the maxInMemory limit.
  18. The following attributes are optional:
  19. timeToIdleSeconds - Sets the time to idle for an element before it expires.
  20. i.e. The maximum amount of time between accesses before an element expires
  21. Is only used if the element is not eternal.
  22. Optional attribute. A value of 0 means that an Element can idle for infinity.
  23. The default value is 0.
  24. timeToLiveSeconds - Sets the time to live for an element before it expires.
  25. i.e. The maximum time between creation time and when an element expires.
  26. Is only used if the element is not eternal.
  27. Optional attribute. A value of 0 means that and Element can live for infinity.
  28. The default value is 0.
  29. diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
  30. The default value is false.
  31. diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
  32. is 120 seconds.
  33. -->
  34. <defaultCache
  35. maxElementsInMemory="10000"
  36. eternal="false"
  37. overflowToDisk="true"
  38. timeToIdleSeconds="120"
  39. timeToLiveSeconds="120"
  40. diskPersistent="false"
  41. diskExpiryThreadIntervalSeconds="120"
  42. />
  43. </ehcache>