Skip to content

Commit

Permalink
feat: cache annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
yujamint committed Jul 25, 2024
1 parent 1ccedfd commit e93f2a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public CategorizedProblem updateCategorizedProblem(Long categorizedProblemId, Me
}

@Transactional(readOnly = true)
// @Cacheable(value = "categorizedProblem", key = "#categoryId")
@Cacheable(value = "categorizedProblem", key = "#categoryId")
public Page<CategorizedProblem> findCategorizedProblemsByCategoryId(Long categoryId, int page, int size) {
PageRequest pageRequest = PageRequest.of(page, size);
return categorizedProblemRepository.findByCategoryCategoryId(categoryId, pageRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public CategorizedSummary findVerifiedCategorizedSummaryByCategorizedSummaryId(L
}

@Transactional(readOnly = true)
// @Cacheable(value = "categorizedSummary", key = "#categoryId")
@Cacheable(value = "categorizedSummary", key = "#categoryId")
public Page<CategorizedSummary> findCategorziedSummarysByCategoryId(Long categoryId, int page, int size) {
PageRequest pageRequest = PageRequest.of(page, size);
return categorizedSummaryRepository.findByCategoryCategoryId(categoryId, pageRequest);
Expand Down

0 comments on commit e93f2a9

Please sign in to comment.