기록해야 성장한다

ehcache 본문

TIL

ehcache

sodapapa-dev 2019. 5. 10. 17:20

DB에서 자주 조회는 쿼리를 파라미터로 구분하여 캐쉬 메모리에 저장하여 

불필요한 커넥션을 줄이고 처리 속도를 올린다.

 

동일한 결과가 예측되는 쿼리에만 사용했다.

확인한 방법은 이클립스 콘솔 창에서 디비 커넥션 없이 결과를 가져오는 지 확인했다.

 

DEBUG|2019-05-10 17:17:49,908||com.ljsnc.kiwi.framework.util.CacheUtil 175|----------------------- Get Config Cache ---------------------------
DEBUG|2019-05-10 17:17:49,909||com.ljsnc.kiwi.framework.util.CacheUtil 180|ConfigVO [idConf=4, logInoutYn=Y, logResYn=null, logActionYn=Y, logErrorYn=Y, defaultLanguage=ko, idInsert=U0001, dtInsert=2017-04-26 19:39:57.0, period=30]
INFO |2019-05-10 17:17:49,913||com.ljsnc.kiwi.framework.advice.ProcessExecutionLogAdvice 49|CallMethodl : ehcacheTest 
DEBUG|2019-05-10 17:17:49,943||org.mybatis.spring.SqlSessionUtils 99|Creating a new SqlSession
DEBUG|2019-05-10 17:17:49,943||org.mybatis.spring.SqlSessionUtils 150|SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@522f1b72] was not registered for synchronization because synchronization is not active
DEBUG|2019-05-10 17:17:49,947||org.mybatis.spring.transaction.SpringManagedTransaction 89|JDBC Connection [HikariProxyConnection@173604090 wrapping com.mysql.jdbc.JDBC4Connection@1cb4d24f] will not be managed by Spring
DEBUG|2019-05-10 17:17:49,947||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getElmtIdByName 145|==>  Preparing: SELECT ELMT_ID FROM tb_element E WHERE E.ELMT_NM = ? LIMIT 1 
DEBUG|2019-05-10 17:17:49,948||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getElmtIdByName 145|==> Parameters: KMS_C1(String)
DEBUG|2019-05-10 17:17:49,951||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getElmtIdByName 145|<==      Total: 1
DEBUG|2019-05-10 17:17:49,952||org.mybatis.spring.SqlSessionUtils 193|Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@522f1b72]
INFO |2019-05-10 17:17:49,953||com.ljsnc.kiwi.framework.controller.TestController 353|getElmtIdByName 10000016
DEBUG|2019-05-10 17:17:49,955||org.mybatis.spring.SqlSessionUtils 99|Creating a new SqlSession
DEBUG|2019-05-10 17:17:49,956||org.mybatis.spring.SqlSessionUtils 150|SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@29a92716] was not registered for synchronization because synchronization is not active
DEBUG|2019-05-10 17:17:49,956||org.mybatis.spring.transaction.SpringManagedTransaction 89|JDBC Connection [HikariProxyConnection@1388873398 wrapping com.mysql.jdbc.JDBC4Connection@1cb4d24f] will not be managed by Spring
DEBUG|2019-05-10 17:17:49,957||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkId 145|==>  Preparing: SELECT LINK_ID FROM tb_link WHERE (SRC_ELMT_ID = ? AND SRC_INTF_IP = ? AND DST_ELMT_ID = ? AND DST_INTF_IP = ?) OR (SRC_ELMT_ID = ? AND SRC_INTF_IP = ? AND DST_ELMT_ID = ? AND DST_INTF_IP = ?) LIMIT 1 
DEBUG|2019-05-10 17:17:49,958||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkId 145|==> Parameters: 10000025(Integer), 192.168.86.241(String), 20000044(Integer), 192.168.86.241(String), 20000044(Integer), 192.168.86.241(String), 10000025(Integer), 192.168.86.241(String)
DEBUG|2019-05-10 17:17:49,963||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkId 145|<==      Total: 1
DEBUG|2019-05-10 17:17:49,964||org.mybatis.spring.SqlSessionUtils 193|Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@29a92716]
INFO |2019-05-10 17:17:49,965||com.ljsnc.kiwi.framework.controller.TestController 360|getLinkId 100000186
DEBUG|2019-05-10 17:17:49,965||org.mybatis.spring.SqlSessionUtils 99|Creating a new SqlSession
DEBUG|2019-05-10 17:17:49,965||org.mybatis.spring.SqlSessionUtils 150|SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6b4a7c05] was not registered for synchronization because synchronization is not active
DEBUG|2019-05-10 17:17:49,966||org.mybatis.spring.transaction.SpringManagedTransaction 89|JDBC Connection [HikariProxyConnection@2107751148 wrapping com.mysql.jdbc.JDBC4Connection@1cb4d24f] will not be managed by Spring
DEBUG|2019-05-10 17:17:49,967||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkIdConsumer 145|==>  Preparing: SELECT LINK_ID FROM tb_link_consumer WHERE (SRC_VID = ? AND DST_VID = ?) OR (SRC_VID = ? AND DST_VID = ?) LIMIT 1 
DEBUG|2019-05-10 17:17:49,968||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkIdConsumer 145|==> Parameters: V3000002600001(String), V3000002700001(String), V3000002700001(String), V3000002600001(String)
DEBUG|2019-05-10 17:17:49,972||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkIdConsumer 145|<==      Total: 1
DEBUG|2019-05-10 17:17:49,973||org.mybatis.spring.SqlSessionUtils 193|Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6b4a7c05]
INFO |2019-05-10 17:17:49,973||com.ljsnc.kiwi.framework.controller.TestController 366|getLinkIdConsumer 300000016
DEBUG|2019-05-10 17:17:49,974||org.mybatis.spring.SqlSessionUtils 99|Creating a new SqlSession
DEBUG|2019-05-10 17:17:49,974||org.mybatis.spring.SqlSessionUtils 150|SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@64f40806] was not registered for synchronization because synchronization is not active
DEBUG|2019-05-10 17:17:49,974||org.mybatis.spring.transaction.SpringManagedTransaction 89|JDBC Connection [HikariProxyConnection@351447214 wrapping com.mysql.jdbc.JDBC4Connection@1cb4d24f] will not be managed by Spring
DEBUG|2019-05-10 17:17:49,975||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkIdProvider 145|==>  Preparing: SELECT LINK_ID FROM tb_link_provider WHERE (SRC_KMS_VID = ? AND DST_KMS_VID = ?) OR (SRC_KMS_VID = ? AND DST_KMS_VID = ?) LIMIT 1 
DEBUG|2019-05-10 17:17:49,976||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkIdProvider 145|==> Parameters: V2000004600001(String), V2000004700001(String), V2000004700001(String), V2000004600001(String)
DEBUG|2019-05-10 17:17:49,980||com.ljsnc.kiwi.framework.mybatis.common.CommMapper.getLinkIdProvider 145|<==      Total: 1
DEBUG|2019-05-10 17:17:49,981||org.mybatis.spring.SqlSessionUtils 193|Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@64f40806]
INFO |2019-05-10 17:17:49,981||com.ljsnc.kiwi.framework.controller.TestController 372|getLinkIdProvider 200000014
DEBUG|2019-05-10 17:17:49,982||org.mybatis.spring.SqlSessionUtils 99|Creating a new SqlSession
DEBUG|2019-05-10 17:17:49,982||org.mybatis.spring.SqlSessionUtils 150|SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6486f900] was not registered for synchronization because synchronization is not active
DEBUG|2019-05-10 17:17:49,982||org.mybatis.spring.transaction.SpringManagedTransaction 89|JDBC Connection [HikariProxyConnection@553019822 wrapping com.mysql.jdbc.JDBC4Connection@1cb4d24f] will not be managed by Spring
DEBUG|2019-05-10 17:17:49,983||com.ljsnc.kiwi.framework.mybatis.command.CommandMapper.getWarningConfigByOccur 145|==>  Preparing: SELECT * FROM tb_log_warning_config C WHERE C.WARN_KIND = ? AND C.WARN_OCCUR = ? 
DEBUG|2019-05-10 17:17:49,984||com.ljsnc.kiwi.framework.mybatis.command.CommandMapper.getWarningConfigByOccur 145|==> Parameters: (String), (String)
DEBUG|2019-05-10 17:17:49,992||com.ljsnc.kiwi.framework.mybatis.command.CommandMapper.getWarningConfigByOccur 145|<==      Total: 0
DEBUG|2019-05-10 17:17:49,993||org.mybatis.spring.SqlSessionUtils 193|Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6486f900]
INFO |2019-05-10 17:17:49,993||com.ljsnc.kiwi.framework.advice.ProcessExecutionLogAdvice 130|실행 시간 : 0.079
WARN |2019-05-10 17:17:50,170||org.springframework.web.servlet.PageNotFound 1147|No mapping found for HTTP request with URI [/favicon.ico] in DispatcherServlet with name 'action'
DEBUG|2019-05-10 17:20:06,754||com.ljsnc.kiwi.framework.util.CacheUtil 175|----------------------- Get Config Cache ---------------------------
DEBUG|2019-05-10 17:20:06,754||com.ljsnc.kiwi.framework.util.CacheUtil 180|ConfigVO [idConf=4, logInoutYn=Y, logResYn=null, logActionYn=Y, logErrorYn=Y, defaultLanguage=ko, idInsert=U0001, dtInsert=2017-04-26 19:39:57.0, period=30]
INFO |2019-05-10 17:20:06,754||com.ljsnc.kiwi.framework.advice.ProcessExecutionLogAdvice 49|CallMethodl : ehcacheTest 
INFO |2019-05-10 17:20:06,772||com.ljsnc.kiwi.framework.controller.TestController 353|getElmtIdByName 10000016
INFO |2019-05-10 17:20:06,773||com.ljsnc.kiwi.framework.controller.TestController 360|getLinkId 100000186
INFO |2019-05-10 17:20:06,773||com.ljsnc.kiwi.framework.controller.TestController 366|getLinkIdConsumer 300000016
INFO |2019-05-10 17:20:06,773||com.ljsnc.kiwi.framework.controller.TestController 372|getLinkIdProvider 200000014
INFO |2019-05-10 17:20:06,774||com.ljsnc.kiwi.framework.advice.ProcessExecutionLogAdvice 130|실행 시간 : 0.019
반응형

'TIL' 카테고리의 다른 글

http 기초  (0) 2020.02.24
Explain 정보보는법  (0) 2019.06.13
log4j 로그레벨  (0) 2019.05.22
grep  (0) 2019.05.13
mySql select key로 새로 생성된 Auto Increment 값 받아오기.  (0) 2019.03.10
Comments