st.cache_data - Streamlit Docs
st.cache_data is used to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).