feat: add redis

This commit is contained in:
2025-12-01 20:24:51 +09:00
parent c300771020
commit f6d5901300
7 changed files with 113 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto;
import com.kamco.cd.kamcoback.postgres.core.ChangeDetectionCoreService;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
@Service
@@ -34,11 +35,14 @@ public class ChangeDetectionService {
return changeDetectionCoreService.getChangeDetectionYearList();
}
@Cacheable(value = "changeDetectionPolygon", key = "#analUid + '_' + #mapSheetNum")
public ChangeDetectionDto.PolygonFeatureList getChangeDetectionPolygonList(
Long analUid, String mapSheetNum) {
return changeDetectionCoreService.getChangeDetectionPolygonList(analUid, mapSheetNum);
}
// Geometry 객체 순환 참조 문제로 캐싱 불가
public ChangeDetectionDto.PointFeatureList getChangeDetectionPointList(
Long analUid, String mapSheetNum) {
return changeDetectionCoreService.getChangeDetectionPointList(analUid, mapSheetNum);