grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.49k stars 288 forks source link

iCal caching bug - optimize unnecessary queries to custom oncall shifts #1216

Closed joeyorlando closed 1 year ago

joeyorlando commented 1 year ago
cached_ical_file_primary = models.TextField(null=True, default=None)
cached_ical_file_overrides = models.TextField(null=True, default=None)

These fields are None by default and the invalidation criteria (here and here) is “being equal to None”, so there will always be extra SQL queries for schedules that are either empty or have no overrides. If this is fixed, these extra SQL queries to custom oncall shifts would disappear, making loading schedules more efficient.

matiasb commented 1 year ago

This should have been fixed by #1312.