2023-11-10 - Cache schedule endpoint for performance¶
Problem¶
The main catalog and rules screen include a small visual indicator (a clock) to show when that tile or rule has a CustomSync associated with it.
The endpoint to fetch that data was very slow as its calling the information directly from a separate cloud service. The delay was slowing down the catalog and rules pages which wasn’t a great user experience.
Solution¶
Because the schedules data only gets updated infrequently, we can fetch that data once when the app starts up and cache it for 10mins at a time which means the catalog and rules dont need to wait anymore.
Leverage the Magic¶
Leverage a simple caching pattern to fetch the data early and persist it for multiple user screens.
Last Refreshed¶
Doc Refreshed: 2024-05-20