Hi,
I have a streamlit app deployed in github here:
The underlying data, ie files/latest_measurements.csv
does get updated every half hour as imposed by the workflow action, however the streamlit app does not, unless I go and clear the cache as developer. The data in the app that fail to be updated is under the 'Latest measurements" header with latest meteo measurements with a UTC timestamp.
Here is the screenshot from the app, showing that the latest data is from Aug 18, 17:00 UTC
Here is the current data in github that shows that the latest data is from 19 Aug, 07:30 UTC (will probably be something even more recent if you check it yourself as the data is updated once every half hour.
What I did?
- Earlier in the development phase, when I committed and pushed to
streamlit_app.py
, things were getting updated such as texts without me including thestreamlit_app.py
in the workflow action named.github/workflows/get_latest_measurements.yml
(actually dont know why and how but anyway, it seemed to work). So I added a `run python streamlit_app.py’ step to the workflow to make sure the code is run. - The second thing: I realised that when I clear the cache manually data do get updated. So I added
st.cache_resource.clear()
at the start of thestreamlit_app.py
hoping this would solve the issue.