Streamlit Cloud Storage Limit & Caches Management

Hi, I’ve already deployed one app in streamlit cloud and currently encountered error message, which I believe it’s related to storage limit after searching previous posts/blogs. As I’m a newbie to computer science and not very familiar with the concepts of storage/cache/session, I’d like to know:

  1. What will be stored in streamlit app’s cache generally?
  • My app’s data process is: user selection → connect to database and extract data based on user selection → process data (e.g., calculation, merge dataset etc.) → give user output that can be downloaded as csv
  1. In addition to some code about cache provided in the blog, I also find that there’s a “clear cache” button in the app page (see screenshot below). I wonder is this button’s effect same for those cache management code? And will reboot the app clear caches?
    image

The return values of the decorated functions.

Yes and yes.

Thanks Goyo! If I want to clear cache each time the user completes analysis(csv downloaded/close the web page/select new user input etc.), where should I put a st.cache_resource.clear() in my code structure? My code structure is like this:

def main():
xxx (user select input & trigger st.button to start analysis)
xxx (connect to database & extract data according to user selection)
xxx (process data)
xxx (show the output & allow user to download output as csv)

if name == “main”:
main()

At the point in your code where the user completes the analysis, which I cannot identify in your sample.