Cache is the central class in ehcache. Caches have {@link Element}s and are managed by the {@link CacheManager}. The Cache performs logical actions. It delegates physical implementations to its {@link net.sf.ehcache.store.Store}s.
A reference to a Cache can be obtained through the {@link CacheManager}. A Cache thus obtained is guaranteed to have status {@link Status#STATUS_ALIVE}. This status is checked for any method which throws {@link IllegalStateException} and the same thrown if it is not alive. This would normallyhappen if a call is made after {@link CacheManager#shutdown} is invoked.
Cache is threadsafe.
Statistics on cache usage are collected and made available through the {@link #getStatistics()} methods.
Various decorators are available for Cache, such as BlockingCache, SelfPopulatingCache and the dynamic proxy ExceptionHandlingDynamicCacheProxy. See each class for details.
@author Greg Luck
@version $Id: Cache.java 793 2008-10-07 07:28:03Z gregluck $