Skip to content

Commit

Permalink
Cache meetingcal processing
Browse files Browse the repository at this point in the history
This also needs to be cached, because the ical parsing and
interpretation of meeting recurrence rules has a nontrivial overhead.
  • Loading branch information
lukasjuhrich committed Oct 18, 2023
1 parent a57e33b commit 09db09f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sipa/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def events_from_calendar(calendar: icalendar.Calendar) -> list[Event]:
)


@cached(cache=TTLCache(maxsize=1, ttl=300))
def meetingcal():
"""Returns the calendar events got form the url in the config"""
if not (calendar := try_fetch_calendar(current_app.config['MEETINGS_ICAL_URL'])):
Expand Down

0 comments on commit 09db09f

Please sign in to comment.