Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4ba7a2219 | ||
|
|
25e42e3af5 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "litek",
|
||||
"private": true,
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -32,12 +32,12 @@ export default defineConfig({
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /^https:\/\/ipinfo\.io\/.*/i,
|
||||
handler: 'NetworkFirst',
|
||||
handler: 'CacheFirst', // 改为 CacheFirst,优先使用缓存
|
||||
options: {
|
||||
cacheName: 'ipinfo-cache',
|
||||
expiration: {
|
||||
maxEntries: 10,
|
||||
maxAgeSeconds: 60 * 5 // 5 分钟
|
||||
maxAgeSeconds: 60 * 60 // 延长到 1 小时
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200]
|
||||
|
||||
Reference in New Issue
Block a user