Streamlit
Streamlit Caching: st.cache_data vs st.cache_resource
Use st.cache_data for data you compute or load and st.cache_resource for shared objects like database connections and models. Here is how both behave, with ttl, max_entries and cache clearing.