Does in_memory_file_manager support on-disk cache?

I’m looking into internals of st.image and was checking if it can avoid redownloading.

I see you address this with InMemoryFileManager. That’s a neat solution, I like it, but also have many questions around its behavior.

  1. Do users have any control over storing behavior? As I understand, as soon as an image is not shown within session (even once), it is removed from the file manager.

  2. Is there a way to keep cached items on drive?

  3. When I provide an on-disk url, it seems that serving is still done by an in-memory manager. Does it mean that file is also kept in memory? If so, is there a way to avoid this?

Thanks for the tool and congratulations on the recent agreement with snowflake!

ping. This discussion at github is partially relevant: Serving content from static location · Issue #1567 · streamlit/streamlit · GitHub because of same concerns (keeping served content in memory)