* EhCache는 경량의 빠른 캐시 엔진으로 확장/분산 기능을 지원하며 높은 품질을 제공.
* xml 설정
<ehcache>
<diskStore path="java.io.tmpdir"/>
<cache name="simpleBeanCache"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
maxElementsOnDisk="10000000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"
/>
</ehcache>
* Cache 조회하기
CacheManager cacheManager = CacheManager.create();
Cache cache = cacheManager.getCache("simpleCacheBean");
* Cache 생성/수정하기
CacheManager cacheManager = CacheManager.create();
Cache cache = cacheManager.getCache("simpleCacheBean");
cache.put(newElement);
* Cache 삭제하기
CacheManager cacheManager = CacheManager.create();
cache.remove("SimpleCacheBean");