Merge pull request #1007 from ae-utbm/calendar

Force ics cache invalidation on ics calendar
This commit is contained in:
thomas girod 2025-01-17 18:09:41 +01:00 committed by GitHub
commit c7ae70972f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,6 +152,7 @@ export class IcsCalendar extends inheritHtmlElement("div") {
async connectedCallback() { async connectedCallback() {
super.connectedCallback(); super.connectedCallback();
const cacheInvalidate = `?invalidate=${Date.now()}`;
this.calendar = new Calendar(this.node, { this.calendar = new Calendar(this.node, {
plugins: [dayGridPlugin, iCalendarPlugin, listPlugin], plugins: [dayGridPlugin, iCalendarPlugin, listPlugin],
locales: [frLocale, enLocale], locales: [frLocale, enLocale],
@ -161,11 +162,11 @@ export class IcsCalendar extends inheritHtmlElement("div") {
headerToolbar: this.currentToolbar(), headerToolbar: this.currentToolbar(),
eventSources: [ eventSources: [
{ {
url: await makeUrl(calendarCalendarInternal), url: `${await makeUrl(calendarCalendarInternal)}${cacheInvalidate}`,
format: "ics", format: "ics",
}, },
{ {
url: await makeUrl(calendarCalendarExternal), url: `${await makeUrl(calendarCalendarExternal)}${cacheInvalidate}`,
format: "ics", format: "ics",
}, },
], ],