Hello,
I would like to know if there is a problem with “@st.cache_data”, these 2 last days, I’ve noticed that functions with “@st.cache_data” decorator are no longer cached correctly and rerun as if the cache was at 0(ttl=0s).
For other information :
I have noticed this behavior on the apps deployed on the streamlit community cloud, and when i run the app locally, i got this eror message :
streamlit\util.py:227: RuntimeWarning:
coroutine 'expire_cache' was never awaited
I haven’t changed my code for a while, and here is how i decoracte the functions :
hello thank you for your reply, i cannot share this app because it’s a private one for teamwork, but here is a eror message i have on the Manage app logs :
/home/adminuser/venv/lib/python3.9/site-packages/streamlit/util.py:227: RuntimeWarning: coroutine 'expire_cache' was never awaited
pass
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
This app is continuously loading and reloading the main function. I have only a side bar with a spinner that keeps running without stopping, displaying messages like: 'Running get_function... '"
for the time being go and use cachetools.func.ttl_cache as workaround.
functionality for user should be alsmost the same, except that progress animation will be not showing.
and yes, after updating to 1.32 iam facing same issue.
streamlit/util.py:227: RuntimeWarning: coroutine ‘expire_cache’ was never awaited
pass
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
But im seeing this warning after integrating asyncio and im using @st.cache_data decorator. it might be due to an incompatibility or incorrect usage of asynchronous functions with Streamlit’s cache.
But it doesn’t directly affect the functionality of my app. Just slowing initial loading.
Same problem here. Didn’t occur before I updated from 1.31.1 to 1.32.0. Doesn’t happen now after I reverted back to 1.31.1. I don’t need anything from 1.32.0 so I’ll just stick to 1.31.1 for now.
We have an issue with the 1.32.0 version which causes the mentioned RuntimeWarning and our CPU utilization to max out The 1.32.1 patch will likely fix that, but it needs a bit further evaluation.