How to clear cache data from web application deployed in streamlit cloud community

Summary

I have deployed an application in streamlit cloud community, sometimes due to cache data. my data is not getting refreshed with new data ingested but it is working fine in my local environment.

Steps to reproduce

I am using

@st.cache(allow_output_mutation=True)

and also in some case as

# Function to get country name from dynamodb table
@st.experimental_memo(show_spinner=False)
@st.cache(allow_output_mutation=True, show_spinner=False)

Expected behavior:

cache will be deleted as when browser tab or entire browser closed.

Actual behavior:

it is not clearing the cache even after application closed in browser.

need support, as it is being used as production

That’s not how it works. Use session_state instead.

Hi @Goyo ,

i don’t want to run the function when there is no change in user selection. data to be there in cache.

You should be able to do that using session_state. Anyway, cache persists across sessions.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.