I’m building a multi-user dashboard that will query a database periodically to update a Datatable with the latest data. As far as I know, I’ll need to use dcc.Interval
to fire a callback that reads the data. In a single-user dashboard this would be all I’d need, but in a multi-user app my understanding is that without caching this will cause the expensive query to run every time any user’s Interval
component triggers it, which will mean a lot of redundant queries if there are many users.
Should I then use Flask-Caching
with a timeout as described here?
Thought I’d kick off a thread about this before I start building the app because it’s kinda hard to test and I haven’t seen it discussed here before.