Skip to content

Commit

Permalink
Merge pull request #94 from LetsCareer-A/refactor/#93
Browse files Browse the repository at this point in the history
#93 [refactor] 캐싱 커리어 보드에 적용
  • Loading branch information
oosedus authored Sep 11, 2024
2 parents 6d86688 + eeb7d96 commit f6d5f33
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public GetCareerDetailResponse getCareerDetail(Long userId, Long careerId) {
}

@Transactional
@Cacheable(value = "CareersCache", key = "#userId", unless = "#result == null || #result.careers.size() == 0")
public GetCareersResponse getCareers(Long userId, int page, int size, List<String> category) {
User user = getUser(userId);
Pageable pageable = PageRequest.of(page - 1, size);
Expand All @@ -72,7 +73,6 @@ public GetCareersResponse getCareers(Long userId, int page, int size, List<Strin
}

@Transactional
@Cacheable(value = "allCareersCache", key = "#userId", unless = "#result == null || #result.careers.size() == 0")
public GetAllCareersResponse getAllCareers(Long userId, Long scheduleId, Long stageId) {
User user = getUser(userId);
Schedule schedule = getSchedule(scheduleId);
Expand Down

0 comments on commit f6d5f33

Please sign in to comment.