Change cache load function

Hi all,

I would like to change the message of e.g. “Running load_data()” to a custom message when the user is awaiting the cache function being computed. Is that possible?

1 Like

Hi @quba9210,

The name of the cached function is displayed. So, instead of load_data(), change the function name to what you’d like displayed, e.g. my_function().

To customize the full message (i.e. remove Running), i’m not sure. Perhaps modifying the cache function somehow: https://github.com/streamlit/streamlit/blob/a20aba7fbc0380b8ed05664f33275d81435a2df7/lib/streamlit/caching.py#L512