calgo-lab / green-db

The monorepo that powers the GreenDB.
https://calgo-lab.github.io/green-db/
22 stars 2 forks source link

Monitoring - always use cached results when the db was not updated #98

Closed BigDatalex closed 1 year ago

BigDatalex commented 1 year ago

Currently the caching in Streamlit works only when one is switching between tabs within the dashboard. It would be great if the cached results were used more often for example: if one refreshes the page, or opens the dashboard in a new browser tab, or multiple users access the dashboard. The easiest might be to check if there have been new updates in the db or if the latest timestamp is still the latest timestamp and if so, do not query the db again and use the cached results instead.

se-jaeger commented 1 year ago

For this, we probably should look at streamlite's cache feature and move away form session_state.

Pointers: