HomePhabricator

Fix two issues with user Calendar event availability cache display

Description

Fix two issues with user Calendar event availability cache display

Summary:
Ref T11816. Two minor issues:

  • We used $event, not $next_event, as the event providing the PHID for "Busy at <event name>". This rendered "Busy at <most future event>" on the profile instead of "Busy at <next upcoming event".
  • The TTL computation used the event start, not the event end, so we could end up rebuilding the cache too often for users busy at an event.

Test Plan:

  • Attended an event in the near future and one later on.
  • Saw profile now say "busy at <near future event>" correctly.
  • In DarkConsole "Services" tab, no longer saw unnecessary cache refills while attending an event.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D17643