diff --git a/src/main/java/com/app/domain/categorizedproblem/service/CategorizedProblemService.java b/src/main/java/com/app/domain/categorizedproblem/service/CategorizedProblemService.java index dc53f67..efae30a 100644 --- a/src/main/java/com/app/domain/categorizedproblem/service/CategorizedProblemService.java +++ b/src/main/java/com/app/domain/categorizedproblem/service/CategorizedProblemService.java @@ -46,7 +46,6 @@ public class CategorizedProblemService { private final ProblemService problemService; - @CacheEvict(value = "categorizedProblem", key = "#categoryId") public CategorizedProblem createCategorizedProblem(Long categoryId, Long problemId) { checkForDuplicateCategorizedProblem(categoryId, problemId); @@ -229,8 +228,6 @@ public MemberSavedSummaryDto.pdfResponse createCategorizedProblemsPdf(Long categ } } - - @CacheEvict(value = "categorizedProblem", key = "#categorizedProblem.category.categoryId") public CategorizedProblem updateCategorizedProblem(Long categorizedProblemId, MemberSavedProblemDto.Patch problemPatchDto) { CategorizedProblem categorizedProblem = findVerifiedCategorizedProblemByCategorizedProblemId(categorizedProblemId); problemService.updateProblem( @@ -241,13 +238,12 @@ public CategorizedProblem updateCategorizedProblem(Long categorizedProblemId, Me } @Transactional(readOnly = true) - @Cacheable(value = "categorizedProblem", key = "#categoryId") +// @Cacheable(value = "categorizedProblem", key = "#categoryId") public Page findCategorizedProblemsByCategoryId(Long categoryId, int page, int size) { PageRequest pageRequest = PageRequest.of(page, size); return categorizedProblemRepository.findByCategoryCategoryId(categoryId, pageRequest); } - @CacheEvict(value = "categorizedProblem", key = "#categorizedProblem.category.categoryId") public void deleteCategorizedProblem(Long categorizedProblemID){ CategorizedProblem categorizedProblem = findVerifiedCategorizedProblemByCategorizedProblemId(categorizedProblemID); categorizedProblemRepository.deleteById(categorizedProblemID); diff --git a/src/main/java/com/app/domain/categorizedsummary/service/CategorizedSummaryService.java b/src/main/java/com/app/domain/categorizedsummary/service/CategorizedSummaryService.java index bcab358..d2f49f7 100644 --- a/src/main/java/com/app/domain/categorizedsummary/service/CategorizedSummaryService.java +++ b/src/main/java/com/app/domain/categorizedsummary/service/CategorizedSummaryService.java @@ -40,7 +40,6 @@ public class CategorizedSummaryService { private final SummaryRepository summaryRepository; - @CacheEvict(value = "categorizedSummary", key = "#categoryId") public CategorizedSummary createCategorizedSummary(Long categoryId, Long summaryId) { checkForDuplicateCategorizedProblem(categoryId, summaryId); @@ -76,7 +75,6 @@ public SummaryDto.pdfResponse createSummaryPdf(Long categorizedSummaryId) throws return summaryService.createSummaryPdf(summaryId); } - @CacheEvict(value = "categorizedSummary", key = "#categorizedSummary.category.categoryId") public CategorizedSummary updateCategorizedSummary(Long categorizedSummaryId, SummaryDto.Patch summaryPatchDto) { CategorizedSummary categorizedSummary = findVerifiedCategorizedSummaryByCategorizedSummaryId(categorizedSummaryId); summaryService.updateSummary( @@ -87,7 +85,6 @@ public CategorizedSummary updateCategorizedSummary(Long categorizedSummaryId, Su return categorizedSummaryRepository.save(categorizedSummary); } - @CacheEvict(value = "categorizedSummary", key = "#categorizedSummary.category.categoryId") public void deleteCategorizedSummary(Long categorizedSummaryId) { CategorizedSummary categorizedSummary = findVerifiedCategorizedSummaryByCategorizedSummaryId(categorizedSummaryId); @@ -110,7 +107,7 @@ public CategorizedSummary findVerifiedCategorizedSummaryByCategorizedSummaryId(L } @Transactional(readOnly = true) - @Cacheable(value = "categorizedSummary", key = "#categoryId") +// @Cacheable(value = "categorizedSummary", key = "#categoryId") public Page findCategorziedSummarysByCategoryId(Long categoryId, int page, int size) { PageRequest pageRequest = PageRequest.of(page, size); return categorizedSummaryRepository.findByCategoryCategoryId(categoryId, pageRequest);