From c76b50b45b5eb10586ee766df17a7b63501d44a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PontualTech=20/=20Karl=C3=A3o?= Date: Tue, 28 Apr 2026 07:53:15 -0300 Subject: [PATCH] fix(sw): bump cache version pra invalidar HTML antigo (v1.5.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Service Worker estava servindo HTML cacheado sem o código WebSocket/auto-sync. Bump da VERSION força activate event a deletar caches antigos. Co-Authored-By: Claude Opus 4.7 (1M context) --- server/public/sw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/public/sw.js b/server/public/sw.js index 5b8d6ff..5f22d64 100644 --- a/server/public/sw.js +++ b/server/public/sw.js @@ -1,7 +1,7 @@ // Shivao Service Worker — offline real // Estratégia: shell precachado, tiles cache-first, windy network-first, /api passa direto. // Versão usada nos cache names — bumpa essa string pra invalidar caches antigos em deploys. -const VERSION = 'shivao-v1'; +const VERSION = 'shivao-v1.5.0'; const SHELL_CACHE = `shivao-shell-${VERSION}`; const TILES_CACHE = 'shivao-tiles-v1'; // separado pra não invalidar tiles em update do shell const WINDY_CACHE = `shivao-windy-${VERSION}`;