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

[#222] 캐시 변경시 삭제 추가 #236

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

JoosungKwon
Copy link
Member

🌱 작업 사항

  • 캐시에 저장된 정보가에 내용이 변경되었을시 및 삭제되었을때 삭제 동작 추가
  • CacheEvict 적용

참고

https://hyeri0903.tistory.com/237

🦄 관련 이슈

@JoosungKwon JoosungKwon added the ♻️ Refactor Refactoring label Jul 13, 2023
@JoosungKwon JoosungKwon self-assigned this Jul 13, 2023
@github-actions
Copy link

📝 테스트 커버리지 리포트

File Coverage [70.83%] 🍏
DefaultUserService.java 70.83% 🍏
Total Project Coverage 85.09% 🍏

@JoosungKwon JoosungKwon merged commit 48b3878 into develop Jul 13, 2023
@JoosungKwon JoosungKwon deleted the refactor/222-delete-update-cache branch July 13, 2023 08:47
@@ -56,6 +57,7 @@ public UserProfileResponse getUserProfile(Long userId) {
/* [회원 프로필 수정] UpdateUserRequest DTO를 사용해서 사용자의 프로필(닉네임, 프로필 이미지, 자기소개)를 한번에 수정합니다. */
@Override
@Transactional
@CacheEvict(value = "User", key = "#userId")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateUserProfile 메소드가 실행될 때, userId = 100으로 값이 들어오면
이전에 userId = 100으로 캐시 저장된 리턴 값을 삭제하고, 새로운 리턴 값으로 캐시 저장하는 기능인 것 같은데 맞을까요?!!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 approve 못했다..

Copy link
Member Author

@JoosungKwon JoosungKwon Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아앗...😂

Copy link
Member Author

@JoosungKwon JoosungKwon Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateUserProfile 메소드가 실행될 때, userId = 100으로 값이 들어오면
이전에 userId = 100으로 캐시 저장된 리턴 값을 삭제하고, 새로운 리턴 값으로 캐시 저장하는 기능인 것 같은데 맞을까요?!!

@rlarltj 맞습니다~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ Refactor Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants