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 !