Skip to content

Commit

Permalink
Merge pull request #1007 from ae-utbm/calendar
Browse files Browse the repository at this point in the history
Force ics cache invalidation on ics calendar
  • Loading branch information
imperosol authored Jan 17, 2025
2 parents 17cf0c6 + 7d40387 commit c7ae709
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions com/static/bundled/com/components/ics-calendar-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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",
},
],
Expand Down

0 comments on commit c7ae709

Please sign in to comment.