mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-02 21:08:12 +00:00
rework reaktywności danych z API i WS
This commit is contained in:
+27
-17
@@ -4,7 +4,7 @@ import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 5001,
|
||||
port: 5001
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
@@ -20,13 +20,25 @@ export default defineConfig({
|
||||
options: {
|
||||
cacheName: 'sceneries-cache',
|
||||
expiration: {
|
||||
maxEntries: 1,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
|
||||
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200],
|
||||
statuses: [0, 200]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
urlPattern: new RegExp('^https://raw.githubusercontent.com/Spythere/api/*', 'i'),
|
||||
handler: 'NetworkFirst',
|
||||
options: {
|
||||
cacheName: 'github-api-cache',
|
||||
expiration: {
|
||||
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
|
||||
},
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i,
|
||||
@@ -35,21 +47,19 @@ export default defineConfig({
|
||||
cacheName: 'images-cache',
|
||||
expiration: {
|
||||
maxEntries: 100,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 60,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200, 404],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
statuses: [0, 200, 404]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
},
|
||||
}),
|
||||
],
|
||||
suppressWarnings: true
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user