Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ public TravelPostDetailResponseDto getTravelPostDetail(Long postId) {
String viewCountKey = "post:view:" + postId;
Long viewCount = redisTemplate.opsForValue().increment(viewCountKey);

// [2] 30번 조회할 때 마다 DB 반영
if (viewCount % 30 == 0) { //
// [2] 5번 조회할 때 마다 DB 반영
if (viewCount % 10 == 0) { //
travelPost.updateViewCount(viewCount);
travelPostRepository.save(travelPost);
}
Expand Down