|
|
|
|
@ -1,21 +1,19 @@
|
|
|
|
|
package kr.xit.biz.cmm.service;
|
|
|
|
|
|
|
|
|
|
import org.springframework.cache.*;
|
|
|
|
|
import org.springframework.cache.caffeine.*;
|
|
|
|
|
import org.springframework.stereotype.*;
|
|
|
|
|
import org.springframework.transaction.annotation.*;
|
|
|
|
|
|
|
|
|
|
import com.github.benmanes.caffeine.cache.Cache;
|
|
|
|
|
import com.github.benmanes.caffeine.cache.stats.CacheStats;
|
|
|
|
|
import kr.xit.biz.cmm.mapper.ICmmEnsCacheMapper;
|
|
|
|
|
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
|
|
|
|
|
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
|
|
|
|
|
import kr.xit.biz.ens.model.nice.NiceCiDTO.NiceCiInfo;
|
|
|
|
|
import kr.xit.core.spring.config.cache.CacheType;
|
|
|
|
|
import kr.xit.core.spring.config.cache.CachingConfig;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.cache.CacheManager;
|
|
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
|
import org.springframework.cache.caffeine.CaffeineCache;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import com.github.benmanes.caffeine.cache.stats.*;
|
|
|
|
|
|
|
|
|
|
import kr.xit.biz.cmm.mapper.*;
|
|
|
|
|
import kr.xit.biz.ens.model.cmm.*;
|
|
|
|
|
import kr.xit.biz.ens.model.nice.NiceCiDTO.*;
|
|
|
|
|
import kr.xit.core.spring.config.cache.*;
|
|
|
|
|
import lombok.*;
|
|
|
|
|
import lombok.extern.slf4j.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <pre>
|
|
|
|
|
@ -50,7 +48,7 @@ public class CmmEnsCacheService implements ICmmEnsCacheService {
|
|
|
|
|
* @return NiceCiInfo
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(readOnly = true)
|
|
|
|
|
@Cacheable(cacheNames = "niceCiInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
//@Cacheable(cacheNames = "niceCiInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
public NiceCiInfo getNiceCiInfoCache(final String signguCode, final String ffnlgCode) {
|
|
|
|
|
return cmmEnsMapper.selectNiceCiInfo(signguCode, ffnlgCode);
|
|
|
|
|
}
|
|
|
|
|
@ -61,7 +59,7 @@ public class CmmEnsCacheService implements ICmmEnsCacheService {
|
|
|
|
|
* @param ffnlgCode String
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(readOnly = true)
|
|
|
|
|
@CacheEvict(cacheNames = "niceCiInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
//@CacheEvict(cacheNames = "niceCiInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
public void removeNiceCiInfoCache(final String signguCode, final String ffnlgCode) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -71,7 +69,7 @@ public class CmmEnsCacheService implements ICmmEnsCacheService {
|
|
|
|
|
* @return CmmEnsRlaybsnmDTO
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(readOnly = true)
|
|
|
|
|
@Cacheable(cacheNames = "rlaybsnmInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
//@Cacheable(cacheNames = "rlaybsnmInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
public CmmEnsRlaybsnmDTO getRlaybsnmInfoCache(final CmmEnsRequestDTO dto) {
|
|
|
|
|
return cmmEnsMapper.selectEnsRlaybsnmInfo(dto);
|
|
|
|
|
}
|
|
|
|
|
@ -81,7 +79,7 @@ public class CmmEnsCacheService implements ICmmEnsCacheService {
|
|
|
|
|
* @param dto CmmEnsRequestDTO
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(readOnly = true)
|
|
|
|
|
@CacheEvict(cacheNames = "rlaybsnmInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
//@CacheEvict(cacheNames = "rlaybsnmInfo", keyGenerator = "simpleKeyGenerator")
|
|
|
|
|
public void removeRlaybsnmInfoCache(final CmmEnsRequestDTO dto) {
|
|
|
|
|
log.info("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&{} cache remove &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", dto);
|
|
|
|
|
}
|
|
|
|
|
|