Skip to content

Commit

Permalink
fix: 카테고리 문제 캐시 제거 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yujamint committed Jul 10, 2024
1 parent db6ef45 commit 076f526
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public MemberSavedSummaryDto.pdfResponse createCategorizedProblemsPdf(Long categ
}


@CacheEvict(value = "categorizedProblem", key = "#categoryId")
@CacheEvict(value = "categorizedProblem", key = "#categorizedProblem.category.categoryId")
public CategorizedProblem updateCategorizedProblem(Long categorizedProblemId, MemberSavedProblemDto.Patch problemPatchDto) {
CategorizedProblem categorizedProblem = findVerifiedCategorizedProblemByCategorizedProblemId(categorizedProblemId);
problemService.updateProblem(
Expand All @@ -247,7 +247,7 @@ public Page<CategorizedProblem> findCategorizedProblemsByCategoryId(Long categor
return categorizedProblemRepository.findByCategoryCategoryId(categoryId, pageRequest);
}

@CacheEvict(value = "categorizedProblem", key = "#categoryId")
@CacheEvict(value = "categorizedProblem", key = "#categorizedProblem.category.categoryId")
public void deleteCategorizedProblem(Long categorizedProblemID){
CategorizedProblem categorizedProblem = findVerifiedCategorizedProblemByCategorizedProblemId(categorizedProblemID);
categorizedProblemRepository.deleteById(categorizedProblemID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public SummaryDto.pdfResponse createSummaryPdf(Long categorizedSummaryId) throws
return summaryService.createSummaryPdf(summaryId);
}

@CacheEvict(value = "categorizedSummary", key = "#categoryId")
@CacheEvict(value = "categorizedSummary", key = "#categorizedSummary.category.categoryId")
public CategorizedSummary updateCategorizedSummary(Long categorizedSummaryId, SummaryDto.Patch summaryPatchDto) {
CategorizedSummary categorizedSummary = findVerifiedCategorizedSummaryByCategorizedSummaryId(categorizedSummaryId);
summaryService.updateSummary(
Expand All @@ -87,7 +87,7 @@ public CategorizedSummary updateCategorizedSummary(Long categorizedSummaryId, Su
return categorizedSummaryRepository.save(categorizedSummary);
}

@CacheEvict(value = "categorizedSummary", key = "#categoryId")
@CacheEvict(value = "categorizedSummary", key = "#categorizedSummary.category.categoryId")
public void deleteCategorizedSummary(Long categorizedSummaryId) {
CategorizedSummary categorizedSummary = findVerifiedCategorizedSummaryByCategorizedSummaryId(categorizedSummaryId);

Expand Down

0 comments on commit 076f526

Please sign in to comment.