I am relatively new to dash. I have built a Dash app which currently refers from a local excel file. What I am trying to achieve is that I need to set up a cache file in the server that refreshes every 5 mins and the every new dash instance created in the browser refers to the latest data available. I have a complex stored procedure that gives me with data which is similar to the one present in the excel file. It takes ~1.5 mins to run. That is why I am not updating it live in the dash app. That is why I am in need of a staging process to refresh data in server which needs to happen in back-end and app can refer from the latest data
Objectives that needs to be addressed:
- As soon as my dash app starts it could create a server side cache
which fetched data from the StoredProcedure and store it as either a file/ SQL table in local server / a cache as a pandas data frame (whichever works best & is fast. I assume local data frame in a cache is faster) - Every dash instance from the client would refer to the latest data in
the cache. - The cache refreshes every 5 mins and the interval is not affected by
every instance created. If the browser is refreshed, the app updates the latest data available.