Skip to content

feat: speed up agenda.ics; cache more agenda data#10362

Open
jennifer-richards wants to merge 18 commits intomainfrom
feat/ical
Open

feat: speed up agenda.ics; cache more agenda data#10362
jennifer-richards wants to merge 18 commits intomainfrom
feat/ical

Conversation

@jennifer-richards
Copy link
Member

Speeds up agenda.ics endpoints for full IETF meetings to near instant. Assuming we keep the caches warm as intended, it will also speed up all agenda page loads. The updates do not affect interim meetings, only type_id="ietf".

  • Refactors the agenda_ical() and its helpers to use the same precomputed data that is supplied to the agenda-neue frontend.
  • Adds agenda caching for all meetings, not just the current meeting, with a week-scale cache lifetime for non-current meetings.
  • Changes the ical links to use versionless agenda hrefs so they'll always point to the current revision.
  • Adds a task to populate/refresh the cache for all meetings so it will always be warm.
  • Renames agenda_data_refresh to agenda_data_refresh_task (keeps/deprecates old task until we deploy and update our config to use the new name)
  • Fixes caching for get_href / get_versionless_href mixes data between these calls #10355

I propose that we continue refreshing the agenda data for the "current" meeting every 5 minutes but only weekly for other meetings. That was assumed in choosing the new constants in settings.py. This does not add a mechanism for invalidating the cache dynamically if the agenda is changed. A change like that will need a manual cache refresh if waiting for the next regular refresh is not acceptable.

Note: The cache is kept in memcache. Data for each meeting is 200-300 kB, so it fits well within memcache's size limit. Restarting memcached will lose cached data, though. I think this is acceptable because memcached restarts are rare and the cache will recover on its own as requests come in, usually with at most one slow request per meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

caching for get_href / get_versionless_href mixes data between these calls

1 participant