Files
llm-wiki/raw/official-docs/mdn-object-url-cache-storage.md
DongHyeonka 7bcb54c464 docs(branch-spec): feature-frontend-binary-file-io-store-contract 채움
MDN 근거 3건 수집 후 결정 7개를 근거 기반으로 확정하고 §구현 가이드
4개 sub-section 을 채웠다. 조사에서 기존 계약 2건의 사실 오류가 나왔다.

- EVICTION_SCOPE_DRIFT: 브라우저 eviction 은 origin 전량 삭제이므로
  FE-REG-STORAGE.evictionOrder 는 애플리케이션 주도 정리에만 유효
- CACHE_STORAGE_CONSTRAINT_DRIFT: Cache Storage 는 SW 전용이 아니다
  (Window.caches 접근 가능). FE-D027 의 제한은 정책이지 플랫폼 제약이 아님
- NO_GROUND_TRUTH: ca-tmpl 은 backend 전용이라 이 branch 에 미적용
- CAPABILITY_NAME_COLLISION: ca-tmpl capabilities.yaml 과 다른 개념

신규 raw: mdn-storage-quotas-eviction-persistence,
mdn-file-system-access-opfs, mdn-object-url-cache-storage
6개 신규 branch-note 전부에 governing_docs 추가.
2026-07-28 15:24:19 +09:00

6.3 KiB

title, source_type, url, archive_url, related_branches, related_projects, tags, created
title source_type url archive_url related_branches related_projects tags created
MDN — URL.createObjectURL() / CacheStorage official-doc https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL_static
feature-frontend-binary-file-io-store-contract
feature-frontend-background-execution-worker-contract
ca-skeleton-frontend
frontend
blob
object-url
cache-storage
service-worker
browser
2026-07-28

MDN — URL.createObjectURL() / CacheStorage

Layer: raw/ — 외부 자료의 원문 발췌·출처 기록.

활용 branch (필수, 최소 1개+)

Branch 이 자료가 정당화하는 결정
[[raw/branch-notes/feature-frontend-binary-file-io-store-contract]] object URL 수명 소유 결정(D1), Cache Storage backend 의 실행 컨텍스트 전제
[[raw/branch-notes/feature-frontend-background-execution-worker-contract]] service worker 안에서 object URL 을 만들 수 없다는 제약, Cache Storage 버전 파티션

출처

왜 저장했는지

(a) object URL 을 adapter 가 쌍으로 소유해야 한다는 결정에 외부 근거가 있는지, (b) Cache Storage 가 service worker 전용인지를 확인하기 위해. (b) 는 FE-D027 의 "Cache Storage 는 service worker 호스팅 response cache 전용" 서술이 기술 제약인지 정책인지 가르는 지점이었다.

핵심 인용

[§URL.createObjectURL] "To release an object URL, call revokeObjectURL()."

[§URL.createObjectURL — Availability] "This feature is not available in Service Workers due to its potential to create memory leaks."

[§CacheStorage] "The CacheStorage interface represents the storage for Cache objects."

[§CacheStorage] "Provides a master directory of all the named caches that can be accessed by a ServiceWorker or other type of worker or window scope (you're not limited to only using it with service workers)."

[§CacheStorage] "You can access CacheStorage through the Window.caches property in windows or through the WorkerGlobalScope.caches property in workers."

[§CacheStorage — Examples] "Delete any old caches to respect user's disk space."

[§CacheStorage.delete] "Finds the Cache object matching the cacheName, and if found, deletes the Cache object and returns a Promise that resolves to true. If no Cache object is found, it resolves to false."

[§CacheStorage.keys] "Returns a Promise that will resolve with an array containing strings corresponding to all of the named Cache objects tracked by the CacheStorage. Use this method to iterate over a list of all the Cache objects."

추출된 주장

Claim ID Claim (이 자료가 직접 말하는 것) Evidence quote Strength Applies to Does not prove
C1 object URL 은 명시적으로 revokeObjectURL() 을 호출해야 해제된다 [§createObjectURL] "To release an object URL, call revokeObjectURL()." official-reference 모든 object URL 해제하지 않으면 반드시 누수가 된다는 정량적 근거
C2 createObjectURL메모리 누수 가능성 때문에 Service Worker 에서 제공되지 않는다 [§Availability] "not available in Service Workers due to its potential to create memory leaks" official-reference Service Worker 컨텍스트 window/worker 에서 누수가 발생하지 않는다는 뜻은 아님 — 오히려 같은 위험의 존재를 시사
C3 CacheStorage 는 service worker 전용이 아니며 window scope 에서도 접근 가능하다 [§CacheStorage] "you're not limited to only using it with service workers" official-reference Window.caches·WorkerGlobalScope.caches service worker 없이 오프라인 응답 가로채기가 가능하다는 뜻은 아님
C4 MDN 예제는 캐시 이름에 버전을 넣고 오래된 캐시를 삭제하는 패턴을 제시한다 [§Examples] "Delete any old caches to respect user's disk space." (예제: `myapp-${cacheVersion}`) official-reference Cache Storage 운영 특정 버전 문자열 형식이 표준이라는 뜻은 아님
C5 CacheStorage.keys() 로 캐시 목록을 열거하고 delete(cacheName) 로 개별 캐시를 지울 수 있다 [§CacheStorage.keys] "Use this method to iterate over a list of all the Cache objects." official-reference Cache Storage 개별 응답 단위 eviction 순서를 브라우저가 보장한다는 뜻은 아님

적용 경계

  • 이 자료가 직접 증명하는 것:
    • C1·C2: object URL 의 해제 책임과 Service Worker 미제공 사실
    • C3~C5: Cache Storage 의 접근 범위와 버전 파티션 운영 수단
  • 이 자료가 증명하지 않는 것:
    • object URL 을 adapter 가 소유해야 한다는 것 — MDN 은 해제 필요성만 말하고 소유 주체는 말하지 않는다. 소유 주체는 project decision 이다
    • Cache Storage 를 service worker 로 제한하는 것이 필요하다는 것 — 오히려 C3 은 그 반대를 말한다
  • 내 프로젝트에 적용하려면 추가 확인이 필요한 것:
    • FE-D027 의 "Cache Storage = SW 호스팅 전용" 이 기술 제약이 아니라 정책임을 문서에 명시할 것

메모

  • 인용 1 해석 후보 (미검증): C2 는 "Service Worker 에서 못 쓴다" 는 가용성 사실이지만, 그 사유가 memory leak 이라는 점에서 window 컨텍스트에서도 해제 규율이 필요하다는 방증으로 읽을 수 있다. 다만 이는 해석이며 MDN 이 직접 말한 것은 아니다.
  • 인용 2 해석 후보 (미검증): C3 때문에 FE-D027 의 Cache Storage 서술은 CATEGORY_DRIFT 성격의 정정이 필요하다 — 기술적으로 불가능한 것이 아니라 우리가 그렇게 정한 것이다.
  • 추가로 봐야 할 동일 출처 페이지: URL.revokeObjectURL(), Cache.put() 의 quota 동작

관련

  • 같은 주제 다른 official-doc: [[raw/official-docs/mdn-storage-quotas-eviction-persistence]], [[raw/official-docs/mdn-file-system-access-opfs]]
  • 이 자료를 인용한 wiki 요약: 생성 전