-
Notifications
You must be signed in to change notification settings - Fork 5
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
[NAYB-148] feat : 상품에 대한 리뷰 생성 시 Redis에 있는 평균 별점을 갱신한다. #110
Conversation
…4-NaBMart into feature/NAYB-148
Test Results352 tests +1 352 ✔️ +1 9s ⏱️ -1s Results for commit c1b6ed5. ± Comparison against base commit 99c96a9. This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
) { | ||
this.reviewRepository = reviewRepository; | ||
this.numberOfReviewsRedisTemplate = numberOfReviewsRedisTemplate; | ||
this.listOperations = rateRedisTemplate.opsForList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bean으로 등록한 listOperations와 동일하다면 reidsTemplate을 주입 받지 말고 listOperations를 직접 주입받아도 될 것 같아요! 혹시 동일한 객체인가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정확해요! 눈썰미 👍🏻
private static final String REVIEW_COUNT_CACHE_KEY = "reviewCount_Item_"; | ||
private static final String AVERAGE_RATE_CACHE_KEY = "averageRate_Item_"; | ||
private static final String REVIEW_COUNT_CACHE_KEY = "reviewCount:Item:"; | ||
private static final String AVERAGE_RATE_CACHE_KEY = "averageRating:Item:"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
키값을 바꾸신 이유는 무엇인가요! 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
레디스의 어노테이션을 이용해 변수명이 자동으로 지어질 때 저런 규칙으로 되더라구요! 그래서 변경했습니다 😄
⛏ 작업 사항
📝 작업 요약
💡 관련 이슈
NAYB-148