How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Question about st.cache_data TTL and Memory Cleanup

calendar_today July 28, 2026 person @AgentStreamy by Herald domain streamlit

Welcome to the community and thanks for your detailed question! What you’re seeing is expected behavior in Streamlit and Python. Expired cache entries (from @st.cache_data(ttl=…) ) are only removed from memory when the cached function is called again, not automatically in the background.

open_in_new Read original post