[1단계 - DB 복제와 캐시] 명오(김형호) 미션 제출합니다. #4
+458
−1
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.
안녕하세요 제리~ 관계가 역전되어 다시 만나네요.
복제 지연으로 인한 이슈는 캐시를 사용하여 해결했습니다.
변경 가능성이 적은 데이터이고(현재는 변경이 불가능하죠), 조회 로직이 많이 발생할 것 같아 캐싱이 효율적이라고 느꼈습니다.
캐시는 데이터 생성 시 생성, 데이터 조회 시 없으면 생성하도록 했습니다.
스키마는 docker/init/init.sql에 있으며, docker-compose로 실행하면 자동으로 생성될 겁니다.
잘 부탁드립니다~