260311_03_ENH: 집계 데이터 캐시 초기화 기능 추가
This commit is contained in:
@@ -25,6 +25,7 @@ public class CacheAdminController {
|
|||||||
|
|
||||||
private final YearCache yearCache;
|
private final YearCache yearCache;
|
||||||
private final VariableCache variableCache;
|
private final VariableCache variableCache;
|
||||||
|
private final StatisticsDbCache statisticsDbCache;
|
||||||
private final AuthService authService;
|
private final AuthService authService;
|
||||||
|
|
||||||
@Operation(summary = "가용 연도 리스트 캐시 조회")
|
@Operation(summary = "가용 연도 리스트 캐시 조회")
|
||||||
@@ -56,4 +57,14 @@ public class CacheAdminController {
|
|||||||
|
|
||||||
return variableCache.reload();
|
return variableCache.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "통계처리 캐시 클리어")
|
||||||
|
@PostMapping("/statistics-db/clear/{adminPw}")
|
||||||
|
public void clearStatisticsDbCache(@PathVariable String adminPw) {
|
||||||
|
if (!authService.isAdmin(adminPw)) {
|
||||||
|
throw BusinessException.unauthorized("IS_NOT_ADMIN", "권한이 없습니다.");
|
||||||
|
}
|
||||||
|
|
||||||
|
statisticsDbCache.clearStatisticsCache();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user