Skip to content

Commit

Permalink
[NAYB-148] style : Redis의 평균 평점 키 네이밍 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
bjo6300 committed Sep 16, 2023
1 parent 19757a7 commit e902682
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void shouldGetAverageRatingOfReviewsByItem() {
reviewRepository.save(givenReview);

double result = 5;
String cacheKey = "reviewCount:Item:" + givenItem.getItemId();
String cacheKey = "averageRating:Item:" + givenItem.getItemId();

// when
log.info("DB에서 평균 평점 가져오기");
Expand Down Expand Up @@ -255,7 +255,7 @@ void shouldUpdateAverageRatingAndNumberOfReviews() {
userRepository.save(givenUser);
reviewRepository.save(givenReview);

String cacheKey = "reviewCount:Item:" + givenItem.getItemId();
String cacheKey = "averageRating:Item:" + givenItem.getItemId();

Review addReview = new Review(givenUser, givenItem, 3, "그냥 그러네");
reviewRepository.save(addReview);
Expand Down

0 comments on commit e902682

Please sign in to comment.