Caffeine Cache 확장#119
Merged
Merged
Conversation
- Create CacheConfig with per-cache settings (boardFirstPage, postDetail, commentFirstPage) - Add @Profile("!nocache") guard to prevent conflict with nocache profile - Replace CommentCacheEvictEvent with generic CacheEvictEvent(cacheName, key) - Replace CommentCacheEvictListener with generic CacheEvictListener - Add fallbackExecution=true for non-transactional context safety - Migrate CommentService to use generic cache eviction event - Update all related tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove likedByMe/dislikedByMe fields from PostListItemResponse - Remove withReactions() method and reaction merge logic from getPostPage() - Simplify BoardController.getBoard() by removing unused principal/cookie params - Update JPQL constructor expression to match new 9-param signature - Update PostServiceTest to match new method signatures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Cache board listing page 0 using Caffeine (key: boardId, TTL: 5min) - Stampede prevention via cache.get(key, Callable) - Evict on post create/update/delete (member and guest) - Capture boardId before delete to avoid accessing deleted entity - likeCount staleness accepted until TTL expiry (documented) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CacheConfig bean now manages per-cache settings directly. SPRING_CACHE_* environment variables are no longer effective. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Cache PostResponse in postDetail cache (key: postId, TTL: 30min) - Merge personal reactions (likedByMe/dislikedByMe) fresh on every request - Add PostResponse.withReactions() for reaction merging - Evict postDetail on post update/delete and comment create/delete - viewCount/likeCount stale until TTL expiry (acceptable) - Remove TODO comments from CacheConfig Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace per-request DB UPDATE with ConcurrentHashMap<Long, LongAdder> memory counter. Accumulated counts are flushed to DB every 30 seconds via @scheduled. Uses replace pattern for safe concurrent flush, per-entry @transactional for failure isolation, and @PreDestroy for shutdown flush. Add board first page and post detail cache tests to CacheTests (14 total). Add ViewCountServiceTest with 7 tests including concurrency verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion @transactional on flushSingle() was bypassed because flushViewCounts() called it within the same class (Spring proxy self-invocation). Replaced with TransactionTemplate.executeWithoutResult() which works without proxy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The only TransactionTemplate bean was readOnlyTx (read-only=true), causing "Connection is read-only" error when ViewCountService tried to flush view counts. Added a separate txTemplate bean with default read-write mode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Closed
9 tasks
|
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.



✨ 이슈 번호: #114
완료된 작업
주요 설계 결정