82 lines
3.7 KiB
Markdown
82 lines
3.7 KiB
Markdown
---
|
|
title: blog-topic / cache-consistency-after-commit-stampede-contract
|
|
source_type: blog-topic
|
|
status: raw
|
|
related_branches: [feature-cache-consistency-contract]
|
|
related_projects: [ca-tmpl]
|
|
tags: [blog-topic, ca-tmpl, caching, persistence, spring-boot, transaction-synchronization]
|
|
created: 2026-07-02
|
|
status_label: ready-for-canonical
|
|
target_audience: backend-engineer
|
|
inspiration_url:
|
|
archive_url:
|
|
---
|
|
|
|
# blog-topic: cache-consistency-after-commit-stampede-contract
|
|
|
|
> Layer: `raw/blog-topics/` — 작업 중 나온 블로그 글감 원석. 최종 블로그는 canonical 정제 후 `wiki/blog/`에서 작성한다.
|
|
|
|
## Parent / 부모
|
|
|
|
- [[raw/branch-notes/feature-cache-consistency-contract]] — cache invalidation, stampede, negative cache, consistency window 결정에서 나온 글감.
|
|
|
|
## 트리거 / Trigger
|
|
|
|
- 트리거 유형: `branch-work`
|
|
- 트리거 날짜: 2026-07-02
|
|
- 트리거 연결 노트: [[raw/branch-notes/feature-cache-consistency-contract]]
|
|
|
|
## 글감 / Topic seed
|
|
|
|
- 한 문장 요지: cache invalidation은 after-commit으로, stampede guard는 single/multi-instance별로, negative TTL과 consistency window는 별도 계약으로 나눠야 한다는 주제.
|
|
- 예상 제목 후보:
|
|
- cache invalidation을 transaction commit 뒤로 미루는 이유
|
|
- cache consistency와 stampede guard를 한데 묶으면 안 되는 이유
|
|
|
|
## 핵심 주장 후보 / Claim candidates
|
|
|
|
- 사실 후보:
|
|
- branch에 D2-D8로 after-commit invalidation, stampede, negative cache, consistency window가 정리되어 있다 — 근거 후보: [[raw/branch-notes/feature-cache-consistency-contract]] D2-D8, section+line `:87-107`, tests `:137-143`.
|
|
- 경험 후보:
|
|
- D5-D9에는 unsupported/planned 경계가 있어 raw topic 단계에서 보강 필요로 둬야 한다.
|
|
- 의견/해석 후보:
|
|
- cache consistency는 하나의 기법이 아니라 invalidation timing, concurrency guard, stale window의 조합이다.
|
|
|
|
## Outline seed
|
|
|
|
1. commit 전 invalidation의 함정 — DB transaction과 cache state가 엇갈릴 수 있다.
|
|
2. stampede guard는 deployment model을 탄다 — single-instance lock과 multi-instance lock은 다른 문제다.
|
|
3. negative cache와 consistency window는 숫자 정책이다 — source-backed fact와 project convention을 분리한다.
|
|
|
|
## Canonical 전환 후보 / Canonical extraction candidates
|
|
|
|
- `wiki/projects/ca-tmpl/data-layer-persistence-cache-outbound.md` 후보:
|
|
- ca-tmpl cache consistency project decision.
|
|
- `wiki/concepts/data-layer-persistence-cache-outbound.md` 후보:
|
|
- cache-aside, after-commit invalidation, stampede guard 일반 개념.
|
|
- 필요한 추가 검증:
|
|
- D5-D9의 source support, planned test 구현 여부.
|
|
|
|
## Sources / 근거 후보
|
|
|
|
- [[raw/branch-notes/feature-cache-consistency-contract]] — cache consistency decisions.
|
|
|
|
## 미해결 / Unknown
|
|
|
|
- 아직 확인해야 할 사실: consistency window 수치와 stampede guard 구현 상태.
|
|
- 과장하면 안 되는 부분: planned test와 unsupported decision을 implemented처럼 쓰지 않는다.
|
|
- 블로그로 쓰기 전에 필요한 canonical 정제: source-backed claim과 project-local policy 분리.
|
|
|
|
## Decision / 처리 결정
|
|
|
|
- 액션: `promote-to-canonical`
|
|
- 이유: `wiki/projects/ca-tmpl/data-layer-persistence-cache-outbound.md` 에 after-commit invalidation/stampede 글감으로 반영했다.
|
|
- 다음 단계: target canonical이 아직 `draft` 이므로 `blogify` 전 review/verify가 필요하다. planned test와 unsupported decision을 implemented처럼 쓰지 않는다.
|
|
|
|
## Related / 관련
|
|
|
|
- 관련 branch: [[raw/branch-notes/feature-cache-consistency-contract]]
|
|
- 관련 error:
|
|
- 관련 interview prep:
|
|
- derived blog: 생성 전. 생성 시 `wiki/blog/cache-consistency-after-commit-stampede-contract-YYYY-MM-DD.md` 후보
|