From 7d40387f438b18ec88167f52b8378d64e1dda623 Mon Sep 17 00:00:00 2001 From: Sli Date: Fri, 17 Jan 2025 17:45:21 +0100 Subject: [PATCH] Force ics cache invalidation on ics calendar --- com/static/bundled/com/components/ics-calendar-index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com/static/bundled/com/components/ics-calendar-index.ts b/com/static/bundled/com/components/ics-calendar-index.ts index 11a15a32..3c78f98f 100644 --- a/com/static/bundled/com/components/ics-calendar-index.ts +++ b/com/static/bundled/com/components/ics-calendar-index.ts @@ -152,6 +152,7 @@ export class IcsCalendar extends inheritHtmlElement("div") { async connectedCallback() { super.connectedCallback(); + const cacheInvalidate = `?invalidate=${Date.now()}`; this.calendar = new Calendar(this.node, { plugins: [dayGridPlugin, iCalendarPlugin, listPlugin], locales: [frLocale, enLocale], @@ -161,11 +162,11 @@ export class IcsCalendar extends inheritHtmlElement("div") { headerToolbar: this.currentToolbar(), eventSources: [ { - url: await makeUrl(calendarCalendarInternal), + url: `${await makeUrl(calendarCalendarInternal)}${cacheInvalidate}`, format: "ics", }, { - url: await makeUrl(calendarCalendarExternal), + url: `${await makeUrl(calendarCalendarExternal)}${cacheInvalidate}`, format: "ics", }, ],