fix: 공개 코스 쓰기 작업 시 관련 캐시 즉시 무효화 - #208
Merged
Merged
Conversation
@Cacheable만 있고 @CacheEvict가 없어 코스 생성/수정/삭제 후에도 최대 TTL(1분) 동안 오래된 목록이 그대로 노출되던 문제 수정. 코스 목록은 전체 유저 공용이라 작성자 캐시만이 아니라 allEntries로 전체페이지수/마라톤/추천 캐시를 모두 무효화하도록 함.
unam98
requested review from
RinRinPARK,
YuSuhwa-ve and
funnysunny08
as code owners
July 29, 2026 14:00
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PublicCourseService의 코스 생성/수정/삭제,CourseService의 코스 삭제(공개 코스 연쇄 삭제 포함) 메서드에@CacheEvict추가publicCourseTotalPageCount,marathonPublicCourse,recommendPublicCourse(전체 유저 공용 목록이라allEntries=true로 전체 무효화)Background
Redis 캐싱(#203) 적용 당시 TTL(1분)만 두고
@CacheEvict를 빠뜨려서, 코스가 추가/삭제/수정돼도 최대 1분 동안 오래된 목록이 그대로 노출되는 상태였음. 카프카 로드맵 검토 중(CDC 기반 캐시 무효화 유스케이스를 살펴보다가) 발견.Test plan
JAVA_HOME을 JDK 19로 지정해 로컬 컴파일 성공 확인 (로컬 기본 JDK 26은 Lombok 비호환이라 컴파일 자체가 안 됨 — 프로젝트와 무관한 환경 이슈)