FAQ : Questions about Configuration : General Ehcache
General Ehcache
Where is the source code?
The source code is distributed in the root directory of the download. It is also available through SVN.
Can you use more than one instance of Ehcache in a single VM?
Yes. Create your CacheManager using new CacheManager(...) and keep hold of the reference. The singleton approach, accessible with the getInstance(...) method, is also available. Remember that Ehcache can support hundreds of caches within one CacheManager. You would use separate CacheManagers where you want different configurations. The Hibernate EhCacheProvider has also been updated to support this behavior.
What elements are mandatory in ehcache.xml?
The documentation has been updated with comprehensive coverage of the schema for Ehcache and all elements and attributes, including whether they are mandatory. See “Configuring Cache” in the Ehcache Configuration Guide.
How is auto-versioning of elements handled?
Automatic element versioning works only with unclustered MemoryStore caches. Distributed caches or caches that use off-heap or disk stores cannot use auto-versioning. (Distributed caches require Terracotta BigMemory Max, and off-heap storage requires either Terracotta BigMemory Max or BigMemory Go.)
To enable auto-versioning, set the system property net.sf.ehcache.element.version.auto to true (it is false by default). Manual (user provided) versioning of cache elements is ignored when auto-versioning is in effect. Note that if this property is turned on for one of the ineligible caches, auto-versioning will silently fail.
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback