Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Currently we create a new CacheManager if one is not injected for reasons described in code comments in EhCacheManager.init(). However, in some cases it is useful to simply use the EhCache CacheManager singleton. A couple of examples: 1) When clustering with Terracotta, if you use the singleton instance it is automatically clustered 2) It is convenient to configure all of your caches in a single ehcache.xml file, rather than needing multiple ehcache files for each CacheManager instance.
We should add a property that determines whether or not the EhCacheManager uses the singleton CacheManager or instantiates a new one.