docs: 배포 뒤 재방문자 흰 화면(캐시) 정리 — Phase E - #201
Merged
Merged
Conversation
원인이 코드 밖(zone 설정)에 절반 걸쳐 있어 코드만 봐서는 알 수 없다. 다음에 같은 증상이 나면 또 헤맬 종류라 진단 과정까지 남긴다. - 원인은 캐시가 길어서가 아니라 **비대칭**이었다는 것. wasm 은 Cloudflare 기본 캐시 대상이 아니라 늘 새것, js 는 max-age=14400. 둘 다 4시간이었다면 옛것끼리 짝이 맞아 오히려 멀쩡했다. - 해결에는 web/_headers(코드)와 Browser Cache TTL(대시보드)이 **둘 다** 필요. - 헛짚은 것 두 가지도 적었다: 한 호스트만 보고 "_headers 가 안 먹는다"고 판단한 것(pages.dev 에서는 처음부터 정상), 로컬(master 채널) 빌드와 배포본(stable)을 shasum 비교해 "배포가 깨졌다"고 본 것. - flutter_service_worker.js 가 자기를 unregister 하는 스텁이라는 것 — 존재한다고 캐싱 계층이 있는 게 아니다. 겸사겸사 Phase E '남은 것'의 "GitHub Actions 자동 배포(현재는 수동)"가 낡아서 갱신했다(#197 에서 이미 자동화됨). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
#200 과 대시보드 TTL 변경으로 해결된 건을 정본에 남긴다. 원인이 코드 밖(zone 설정)에 절반 걸쳐 있어 코드만 봐서는 알 수 없고, 같은 증상이 다시 나면 또 헤맬 종류라 진단 과정까지 적었다.
적은 것
.wasm은 Cloudflare 기본 캐시 대상이 아니라 늘 새것,.js는max-age=14400. 역설적으로 둘 다 4시간이었다면 옛것끼리 짝이 맞아 멀쩡했다.web/_headers(코드)와 Browser Cache TTL(대시보드)이 둘 다 필요하다는 것.flutter_service_worker.js가 자기를 unregister 하는 스텁이라는 것 — 파일이 있다고 캐싱 계층이 있는 게 아니다.헛짚은 것도 적었다
같은 함정을 다시 밟지 않으려고:
app.pawmate.kr한 곳만 보고 "_headers가 안 먹는다"고 판단했는데 틀렸다.pawmate-web.pages.dev에서는 처음부터 정상 적용되고 있었다. 두 호스트를 나란히 재야 zone 이 범인이라는 게 드러난다.shasum비교해 "배포가 깨졌다"고 봤는데, 로컬이 master 채널이고 CI 가channel: stable이라 산출물 바이트는 원래 다르다.?x=$RANDOM없이 헤더를 재면 옛 헤더를 본다.곁다리
Phase E '남은 것'의 "GitHub Actions 자동 배포(현재는 수동)"가 낡아서 갱신했다 — #197 에서 이미 자동화됐다.
문서만 바뀌므로 배포 워크플로는 돌지 않는다(
paths필터).🤖 Generated with Claude Code