Files
operationSystem-back/src/main/java/com/caliverse/admin/domain/cache/CommonCacheHandler.java
bcjang 23850acf0f 캐시 handler 생성
로그 조회 갯수 캐싱 처리
로그 객체 생성
로그 엑셀 객체 생성
엑셀 진행률 관리 tracker 생성
2025-06-05 12:09:50 +09:00

25 lines
1001 B
Java

package com.caliverse.admin.domain.cache;
import com.caliverse.admin.domain.datacomponent.MetaDataFileLoader;
import com.caliverse.admin.domain.request.LogGenericRequest;
import com.caliverse.admin.logs.logservice.businesslogservice.BusinessLogGenericService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.stereotype.Component;
@Slf4j
@Component
@EnableCaching(proxyTargetClass = true)
public class CommonCacheHandler {
@Autowired
private BusinessLogGenericService businessLogGenericService;
@Cacheable(value = "businessLogCount", keyGenerator = "logCountKeyGenerator")
public Integer getLogCount(LogGenericRequest logGenericRequest) {
log.info("Cache MISS - Executing actual DB query for count");
return businessLogGenericService.getRawLogCount(logGenericRequest);
}
}