Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/member saved problem #69

Merged
merged 6 commits into from
Jun 16, 2024
Merged

Conversation

googoo9918
Copy link
Member

Cache 적용 및 Fetch Join 적용

  • N+1 문제를 해결하기 위해 카테고리별 문제 조회 api에 Fetch Join을 적용
  • 조회한 data를 DB조회 없이 메모리에서 반환하기 위해 Cache 적용

categorizedProblem 캐시에 categoryId를 키로 사용
캐시에 저장된 데이터는 동일한 요청 시 DB 조회 없이 반환
categorizedSummary 캐시에 categoryId를 키로 사용
캐시에 저장된 데이터는 동일한 요청 시 DB 조회 없이 반환
categoryId를 기준으로 category 탐색할 때, problem과 category를 즉시 로딩하여 한 번의 쿼리로 필요한 모든 데이터를 가져옴
categoryId를 기준으로 category 탐색할 때, summary와 category를 즉시 로딩하여 한 번의 쿼리로 필요한 모든 데이터를 가져옴
Copy link

Test Results

20 tests   20 ✅  2s ⏱️
13 suites   0 💤
13 files     0 ❌

Results for commit 67e7749.

@yujamint yujamint merged commit 093ec44 into dev Jun 16, 2024
2 checks passed
yujamint added a commit that referenced this pull request Jun 16, 2024
…saved-problem"

This reverts commit 093ec44, reversing
changes made to 93320a2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants