mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-05 04:28:10 +00:00
chore(pwa): image caching changes
This commit is contained in:
+1
-17
@@ -38,28 +38,12 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
urlPattern: new RegExp('^https://static.spythere.eu/images/*', 'i'),
|
|
||||||
handler: 'CacheFirst',
|
|
||||||
options: {
|
|
||||||
cacheName: 'spythere-api-cache',
|
|
||||||
expiration: {
|
|
||||||
maxEntries: 100,
|
|
||||||
maxAgeSeconds: 60 * 60 * 24, // <== 1 day
|
|
||||||
},
|
|
||||||
cacheableResponse: {
|
|
||||||
statuses: [200, 302],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
urlPattern: new RegExp('^https://stacjownik.spythere.eu/vehicles', 'i'),
|
urlPattern: new RegExp('^https://stacjownik.spythere.eu/vehicles', 'i'),
|
||||||
handler: 'NetworkFirst',
|
handler: 'NetworkFirst',
|
||||||
options: {
|
options: {
|
||||||
cacheName: 'vehicles-cache',
|
cacheName: 'vehicles-cache',
|
||||||
cacheableResponse: {
|
|
||||||
statuses: [200],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user