chat-with-your-data-solution-accelerator
chat-with-your-data-solution-accelerator copied to clipboard
Cache config in application
Motivation
Every time we call ConfigHelper.get_active_config_or_default() we make a request to the storage account, which happens multiple times per request. Considering that this is not updated often, we should make this request once and cache the value in memory. We can add a note that the app will need to be restarted if the config is updated, in the same way that updating environment variables causes the application to restart.
Requirements
A list of requirements to consider this feature delivered
- Fetch config once during application startup
- Save the config within the class/module
- Update message to mention restarting app after updating config https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator/blob/3e71fe10c50a129a20c314ba015065acdc6d8379/code/backend/pages/04_Configuration.py#L212
Tasks
To be filled in by the engineer picking up the issue