Repository navigation
feat: 메뉴 목록 로컬 캐시 + Redis Pub/Sub 무효화 - #367
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Finishing Touches
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.
작업 요약
MenuRepository.findAllWithImagesByStoreId)menus(store_id, deleted, sort_order)인덱스 추가DistributedCachedMenuDao, key: storeId, TTL 기본 1d) 적용cache:menus)으로 storeId 무효화 메시지 발행performance/menu-cache/Issue Link
문제점 및 어려움
해결 방안
CacheInvalidationPublisher가afterCommit에서 발행onChannelSubscribed) 시 로컬 캐시 전체 비움@Transactional(readOnly = true)제거 (스냅샷 안에서 캐시 미스 로딩 방지)nowait.cache.menu.ttl=0s로 캐시 끄기 가능cache_gets_total{cache="cache:menus"}측정 (EC2, 1,000 req/s 기준 메뉴 쿼리 59,808 → 123, p95 200ms 내 최대 부하 100 → 4,000 req/s)
Reference
performance/menu-cache/README.md🤖 Generated with Claude Code