I’ve got to set up a caching mechanism in order to avoid too many API calls (i.e., running into rate limit). I have successfully set up caching by means of
@st.cache for the API calls and it appears to be working during a single run of Streamlit. However, I also need to cache the data across multiple runs.
As it seems, each time I interact with the Streamlit frontend, a new run is initiated. That’s fine for me but it eats up the API rate rather quickly because through each run, a new API connection is initiated and the cache of the previous run is flushed.
Is it possible to somehow cache/share data across multiple Streamlit runs? That would be awesome!