Product Documentation : Ehcache Developer Guide : Basic Caching : Shutdown the CacheManager
Shutdown the CacheManager
You should shut down a CacheManager after use. It does have a shut-down hook, but it is a best practice to shut it down in your code.
The following shuts down the singleton CacheManager:
CacheManager.getInstance().shutdown();
The following shuts down a CacheManager instance, assuming you have a reference to the CacheManager called manager:
manager.shutdown();
For additional examples, see CacheManagerTest at http://ehcache.org/xref-test/net/sf/ehcache/CacheManagerTest.html.
Copyright © 2014 Software AG, Darmstadt, Germany.

Product Logo |   Feedback