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:
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
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?
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)
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.