Time-to-live not used when caching to disk?

I deployed a streamlit app on Kubernetes using a shared volume to share the cache between multiple pods. Then using persist=True, I write some functions output to the cache on disk.

However, it seems st.cache is not respecting any TTL setting when using the persistent option. I was checking through the codebase and it looks to me as if ttl is only used when caching in-memory.

Can anyone confirm this is true? If so, is there any recommended way to implement a shared cache between pods?

1 Like