Hello
If I download/cache once a day a datafile of 100mb, will it affect your servers? I don’t want to mess them up!
Rene
Hello
If I download/cache once a day a datafile of 100mb, will it affect your servers? I don’t want to mess them up!
Rene
Hi @rcsmit -
I wouldn’t expect anything to blow up, as long as you are within your resource limits. If I were you, I’d actively manage the downloads, so that as soon as you have the new one you delete the old one. The disk space won’t grow indefinitely
Best,
Randy
Thanks for the reply! How do I do delete it? This is my abbreviated code
@st.cache(ttl=60 * 60 * 24)
def download_data_file(url, filename, delimiter_, fileformat):
df_temp = pd.read_csv(url, delimiter=delimiter_, low_memory=False)
You can do something like:
import os
if os.path.exists("data.txt"):
os.remove("data.txt")
ok, thanks a lot !
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.
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.
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.
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.