Closed JonathanGarro closed 3 months ago
Investigated this a bit and realized this will require a rebuild of a few elements in the emergencies route. I created a helper function in the emergencies' utility file that takes in the trello URL and returns the data from the API. The problem is that caching in the way I've structured this means it would cache for the last emergency for which a user accessed that route, not just the one someone is looking at, meaning you might get the wrong board's data on a given emergency.
OBE once we shifted to GitHub projects.
In looking through the logs, I'm realizing that the call to Trello on page load when viewing emergency records is unnecessary. Let's add
flask-cache
decorator to that page view function and store Trello data for a set period of time to limit the pings.