Hello, I’m wondering if there’s any possible reason to cache an API call in a Streamlit app if it is already designed to perform the API call only once per user session? Here is python pseudo-code to demonstrate what I mean by this scenario.
...
if "external_data" not in st.session_state:
api_result = make_the_api_call()
cleaned_data = turn_api_result_into_dataframe()
st.session_state["external_data"] = cleaned_data
...
Hi @Goyo - can you clarify that a bit more? It sounds like you’re saying caching the response of the API call would allow it to be used across multiple sessions? The logic I shared above already ensures the API call would only be made once per session.