--- title: blog-topic / cache-backend-router-fail-open-decorator source_type: blog-topic status: raw related_branches: [feature-cachestore-multi-backend-router] related_projects: [ca-tmpl] tags: [blog-topic, ca-tmpl, caching, spring-boot, fail-open-fail-closed, circuit-breaker] created: 2026-07-02 status_label: ready-for-canonical target_audience: backend-engineer inspiration_url: archive_url: --- # blog-topic: cache-backend-router-fail-open-decorator > Layer: `raw/blog-topics/` — 작업 중 나온 블로그 글감 원석. 최종 블로그는 canonical 정제 후 `wiki/blog/`에서 작성한다. ## Parent / 부모 - [[raw/branch-notes/feature-cachestore-multi-backend-router]] — cache backend routing과 fail-open decorator 구현 경험에서 나온 글감. ## 트리거 / Trigger - 트리거 유형: `branch-work` - 트리거 날짜: 2026-07-02 - 트리거 연결 노트: [[raw/branch-notes/feature-cachestore-multi-backend-router]] ## 글감 / Topic seed - 한 문장 요지: cache 장애를 backend 내부 `try/catch`로 흩뿌리지 않고 router/decorator 조립 계약으로 중앙화한 이유를 정리한다. - 예상 제목 후보: - Cache fail-open을 decorator로 분리한 이유 - Cache backend router로 OCP와 장애 정책을 같이 지키기 ## 핵심 주장 후보 / Claim candidates - 사실 후보: - `FailOpenCacheStore`, `CacheStoreRouter`, `CacheBackend` 기여 모델이 implemented/local evidence로 정리됐다 — 근거 후보: [[raw/branch-notes/feature-cachestore-multi-backend-router]] D1-D3, section+line `:78-83`, 구현 결과 `:104-112`, closure `:121-125`. - 경험 후보: - backend별 장애 처리 분기가 늘어날수록 정책이 흩어지므로, fail-open/fail-closed를 조립 계층에서 명시하는 편이 낫다. - 의견/해석 후보: - cache는 correctness owner가 아니라 availability optimization일 수 있으므로, 실패 정책을 use case 밖에서 드러내야 한다. ## Outline seed 1. cache backend가 늘어나면 장애 정책도 늘어난다 — Redis/Caffeine/noop을 같은 interface로 묶는 것만으로는 부족하다. 2. fail-open은 내부 catch가 아니라 contract다 — 어떤 exception을 삼키고 무엇을 관측할지 중앙에서 정한다. 3. router/decorator 구조가 OCP를 지키는 지점 — backend 추가와 정책 변경을 분리한다. ## Canonical 전환 후보 / Canonical extraction candidates - `wiki/projects/ca-tmpl/data-layer-persistence-cache-outbound.md` 후보: - ca-tmpl cache backend router와 fail-open decorator 구현 사실. - `wiki/concepts/fail-open-fail-closed.md` 후보: - cache에서 fail-open을 선택할 수 있는 조건과 경계. - 필요한 추가 검증: - 실제 class/test anchor와 exception classification 범위. ## Sources / 근거 후보 - [[raw/branch-notes/feature-cachestore-multi-backend-router]] — D1-D3와 구현/검증 결과. ## 미해결 / Unknown - 아직 확인해야 할 사실: fail-open 적용 대상 exception, metric/log 기록 방식. - 과장하면 안 되는 부분: 모든 cache 실패를 삼켜도 된다는 뜻이 아니다. ca-tmpl에서 정한 cache role과 검증된 backend 범위로 제한한다. - 블로그로 쓰기 전에 필요한 canonical 정제: project 문서의 data-layer cache section 보강. ## Decision / 처리 결정 - 액션: `promote-to-canonical` - 이유: `wiki/projects/ca-tmpl/data-layer-persistence-cache-outbound.md` 에 cache router/decorator 글감으로 반영했다. - 다음 단계: target canonical이 아직 `draft` 이므로 `blogify` 전 review/verify가 필요하다. 모든 cache 실패를 삼켜도 된다고 쓰지 않는다. ## Related / 관련 - 관련 branch: [[raw/branch-notes/feature-cachestore-multi-backend-router]] - 관련 error: - 관련 interview prep: - derived blog: 생성 전. 생성 시 `wiki/blog/cache-backend-router-fail-open-decorator-YYYY-MM-DD.md` 후보