Test cachingu scenerii

This commit is contained in:
2022-07-14 20:44:43 +02:00
parent 55c64d5f0a
commit d79705ca5c
6 changed files with 123 additions and 59 deletions
+14 -2
View File
@@ -1,8 +1,20 @@
module.exports = {
pwa: {
workboxPluginModule: 'GenerateSW',
workboxOptions: {
skipWaiting: true,
clientsClaim: true,
navigateFallback: '/index.html',
runtimeCaching: [
{
urlPattern: new RegExp('^https://stacjownik.eu-4.evennode.com/api/getSceneries'),
handler: 'NetworkFirst',
options: {
cacheName: 'sceneries-cache',
expiration: {
maxAgeSeconds: 24 * 60 * 60, // 24 hours
},
},
},
],
},
},
};