mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-02 21:08:12 +00:00
chore: adjusted to new version of API vehicles data
This commit is contained in:
+6
-13
@@ -24,33 +24,26 @@ export default defineConfig({
|
||||
cleanupOutdatedCaches: true,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /^https:\/\/stacjownik.spythere.eu\/api\/getSceneries/i,
|
||||
handler: 'StaleWhileRevalidate',
|
||||
urlPattern:
|
||||
/^https:\/\/stacjownik.spythere.eu\/api\/(getVehicles|getDonators|getSceneries)/i,
|
||||
handler: 'NetworkFirst',
|
||||
options: {
|
||||
cacheName: 'spythere-sceneries-cache',
|
||||
cacheName: 'stacjownik-api-cache',
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
urlPattern: /^https:\/\/stacjownik.spythere.eu\/vehicles/i,
|
||||
handler: 'StaleWhileRevalidate',
|
||||
options: {
|
||||
cacheName: 'spythere-vehicles-cache'
|
||||
}
|
||||
},
|
||||
{
|
||||
urlPattern: /^https:\/\/static.spythere.eu\/.*/i,
|
||||
handler: 'CacheFirst',
|
||||
handler: 'StaleWhileRevalidate',
|
||||
options: {
|
||||
cacheName: 'spythere-static-cache',
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200]
|
||||
},
|
||||
expiration: {
|
||||
maxEntries: 100,
|
||||
maxAgeSeconds: 60 * 60 * 8
|
||||
maxEntries: 100
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user