File tree Expand file tree Collapse file tree 3 files changed +21
-21
lines changed
src/main/java/com/example/Jinus/service/cafeteria Expand file tree Collapse file tree 3 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ private long calculateTtlUntilNextMidnight(Date dietDate) {
5555
5656
5757 // Redis에서 조회 (없으면 DB에서 가져옴)
58- // @Cacheable(
59- // value = "cafeteriaList",
60- // key = "#p0",
61- // cacheManager = "contentCacheManager")
58+ @ Cacheable (
59+ value = "cafeteriaList" ,
60+ key = "#p0" ,
61+ cacheManager = "contentCacheManager" )
6262 public List <CafeteriaDto > getCafeteriaList (int campusId ) {
6363 return cafeteriaRepositoryV2 .findCafeteriaListByCampusId (campusId );
6464 }
Original file line number Diff line number Diff line change 1212public class CafeteriaQueryService {
1313 private final CafeteriaRepository cafeteriaRepositoryV2 ;
1414
15- // @Cacheable(
16- // value = "cafeteriaId",
17- // key = "#p0 + '::' + #p1",
18- // unless = "#result == -1",
19- // cacheManager = "contentCacheManager")
15+ @ Cacheable (
16+ value = "cafeteriaId" ,
17+ key = "#p0 + '::' + #p1" ,
18+ unless = "#result == -1" ,
19+ cacheManager = "contentCacheManager" )
2020 public int getCafeteriaId (String cafeteriaName , int campusId ) {
2121 return cafeteriaRepositoryV2 .findCafeteriaId (cafeteriaName , campusId ).orElse (-1 );
2222 }
2323
24- // @Cacheable(
25- // value = "cafeteriaUrl",
26- // key = "#p0",
27- // cacheManager = "contentCacheManager")
24+ @ Cacheable (
25+ value = "cafeteriaUrl" ,
26+ key = "#p0" ,
27+ cacheManager = "contentCacheManager" )
2828 public String getImgUrl (int cafeteriaId ) {
2929 return cafeteriaRepositoryV2 .findImgUrlByCafeteriaId (cafeteriaId );
3030 }
Original file line number Diff line number Diff line change 1515public class CampusService {
1616 private final CampusRepository campusRepositoryV2 ;
1717
18- // @Cacheable(
19- // value = "campusId",
20- // key = "#p0",
21- // cacheManager = "contentCacheManager")
18+ @ Cacheable (
19+ value = "campusId" ,
20+ key = "#p0" ,
21+ cacheManager = "contentCacheManager" )
2222 // 사용자의 campusId 받아 캠퍼스 이름 찾기
2323 public String getUserCampusName (int campusId ) {
2424 return campusRepositoryV2 .findCampusNameByCampusId (campusId );
@@ -29,10 +29,10 @@ public List<CampusEntity> getCampusList() {
2929 return campusRepositoryV2 .findCampusList ();
3030 }
3131
32- // @Cacheable(
33- // value = "campusName",
34- // key = "#p0",
35- // cacheManager = "contentCacheManager")
32+ @ Cacheable (
33+ value = "campusName" ,
34+ key = "#p0" ,
35+ cacheManager = "contentCacheManager" )
3636 // 캠퍼스 이름으로 id 찾기
3737 public int getCampusId (String campusName ) {
3838 return campusRepositoryV2 .findCampusIdByName (campusName );
You can’t perform that action at this time.
0 commit comments