mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-08 04:39:16 +02:00
added own caching for ical feed
This commit is contained in:
@@ -85,6 +85,17 @@ export default defineConfig({
|
||||
globPatterns: ["**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}"],
|
||||
cleanupOutdatedCaches: true,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: ({ url }) => url.pathname.startsWith('/api/feed'),
|
||||
method: 'GET',
|
||||
handler: 'NetworkFirst',
|
||||
options: {
|
||||
cacheName: 'calendar-feed-cache',
|
||||
expiration: {
|
||||
maxAgeSeconds: 12 * 60 * 60, // 12 hours
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
urlPattern: /^https?.*/,
|
||||
handler: "NetworkFirst",
|
||||
|
Reference in New Issue
Block a user