From 09f9e6588f90e1ed16216a95395ccc3c60bd5230 Mon Sep 17 00:00:00 2001 From: typist Date: Wed, 29 Oct 2025 09:34:59 +0800 Subject: [PATCH] fix: update caching strategy for ipinfo API in Vite config - Changed caching handler from 'CacheFirst' to 'NetworkFirst' to prioritize network responses. - This adjustment aims to improve data freshness while still utilizing caching effectively. --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index fa644bb..c6e53ac 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -32,7 +32,7 @@ export default defineConfig({ runtimeCaching: [ { urlPattern: /^https:\/\/ipinfo\.io\/.*/i, - handler: 'CacheFirst', // 改为 CacheFirst,优先使用缓存 + handler: "NetworkFirst", options: { cacheName: 'ipinfo-cache', expiration: {