fix: caching z API GH

This commit is contained in:
2023-01-01 22:02:24 +01:00
parent 3d9d7888d8
commit 6a10b1e191
3 changed files with 18 additions and 18 deletions
+16 -16
View File
@@ -11,22 +11,22 @@ export default defineConfig({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
runtimeCaching: [
{
urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
handler: 'NetworkFirst',
options: {
cacheName: 'github-api-cache',
expiration: {
maxEntries: 2,
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
// runtimeCaching: [
// {
// urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
// handler: 'NetworkFirst',
// options: {
// cacheName: 'github-api-cache',
// expiration: {
// maxEntries: 2,
// maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
// },
// cacheableResponse: {
// statuses: [0, 200],
// },
// },
// },
// ],
},
devOptions: {
enabled: true,