fix(tkpurchase): fetch에 cache:no-store 추가 — 브라우저 캐시 완전 우회

이전 응답이 브라우저에 캐시된 상태에서 서버 Cache-Control만으로는
기존 캐시를 무효화할 수 없음. fetch() 호출 시 cache:'no-store'로
브라우저가 항상 네트워크 요청하도록 강제.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-16 07:46:41 +09:00
parent 5398581b87
commit 73bd13a7cd
10 changed files with 10 additions and 10 deletions

View File

@@ -133,7 +133,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-accounts.js?v=2026031601"></script>
<script>initAccountsPage();</script>
</body>

View File

@@ -148,7 +148,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-daylabor.js?v=2026031601"></script>
<script>initDayLaborPage();</script>
</body>

View File

@@ -88,7 +88,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-dashboard.js?v=2026031601"></script>
<script>initDashboard();</script>
</body>

View File

@@ -61,7 +61,7 @@
<div id="historyPagination" class="mt-4 flex justify-center gap-2"></div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-partner-history.js?v=2026031601"></script>
<script>initPartnerHistory();</script>
</body>

View File

@@ -81,7 +81,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-partner-portal.js?v=2026031601"></script>
<script>initPartnerPortal();</script>
</body>

View File

@@ -294,7 +294,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-partner.js?v=2026031601"></script>
<script>initPartnerPage();</script>
</body>

View File

@@ -275,7 +275,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-schedule.js?v=2026031601"></script>
<script>initSchedulePage();</script>
</body>

View File

@@ -40,7 +40,7 @@ async function api(path, opts = {}) {
const token = getToken();
const headers = { 'Authorization': token ? `Bearer ${token}` : '', ...(opts.headers||{}) };
if (!(opts.body instanceof FormData)) headers['Content-Type'] = 'application/json';
const res = await fetch(API_BASE + path, { ...opts, headers });
const res = await fetch(API_BASE + path, { ...opts, headers, cache: 'no-store' });
if (res.status === 401) { _safeRedirect(); throw new Error('인증 만료'); }
if (res.headers.get('content-type')?.includes('text/csv')) return res;
const data = await res.json();

View File

@@ -100,7 +100,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-workreport-summary.js?v=2026031601"></script>
<script>initSummaryPage();</script>
</body>

View File

@@ -114,7 +114,7 @@
</div>
</div>
<script src="/static/js/tkpurchase-core.js?v=2026031602"></script>
<script src="/static/js/tkpurchase-core.js?v=2026031603"></script>
<script src="/static/js/tkpurchase-workreport.js?v=2026031601"></script>
<script>initWorkReportPage();</script>
</body>