- The "defaultCache" element is necessary. It does not define any cache, it is just a template for any caches created.
- At the minimum, it needs a "defaultCache" element and a "cache" element.
- The "ehcache.xml" file should be placed at the top-level of the classpath. Doesn't have to be in "WEB-INF/classes". It can be in any of the jar files (e.g. in "WEB-INF/lib").
- The above applies in the case where only one EH Cache instance is defined (i.e. one config file). This will be the instance that will be created by default when calling "CacheManager.getInstance()". For multiple instances, the CacheManagers should be created programatically passing in the config files.
- "eternal" means whether the cached entries ever expire. If set to true, "timeToIdleSeconds" and "timeToLiveSeconds" settings aren't necessary.
- The same EH Cache instance can be used for both Hibernate and the program itself.
My online tech scrapbook where I keep my notes in case I need to look them up later
Friday, June 1, 2012
EHCache Config File (i.e. ehcache.xml)
Some notes about this file:
Labels:
ehcache
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment