Skip navigation links

Package com.poscoict.glueframework.cache

cache package.

See: Description

Package com.poscoict.glueframework.cache Description

cache package.

Cache Manager 는 applicationContext.xml에 다음과 같이 정의한다. 둘 중 하나를 선택해서 사용하도록 한다.

 applicationCotext.xml 예 
 <bean id="cacheManager-1" class="com.poscoict.glueframework.cache.ehcache.GlueEhCacheManager"/>
 <bean id="cacheManager-2" class="com.poscoict.glueframework.cache.jcs.GlueJCSCacheManager"/>
 
  java code 예 
 
 Strinb cacheManagerBeanId = ... ;
 GlueCacheManager cacheManager = (GlueCacheManager)GlueStaticContext.getBeanFactory().getBeanObject(cacheManagerBeanId);
 Object cacheKey = "test-key";
 Object cacheObject = null;
 cacheObject = cacheManager.getCacheObject(cacheKey);
 if(cacheObject == null){
     cacheObject = "ABC";
     cacheManager.putCacheObject(cacheKey, cacheObject);
     System.out.println(cacheKey + "의 이름으로 ["+ cacheObject + "]를 캐싱합니다.");
 }else{
     System.out.println(cacheKey + "의 이름으로 캐싱된 Data는 ["+ cacheObject + "] 입니다. ");
 }
 
 
Since:
2013. 5. 10.
Version:
1.0.0
Author:
허 두녕
Skip navigation links

Copyright © 2023–2024 POSCO DX. All rights reserved.