Does @st.cache_data cache across sessions?

Sorry, I overlooked that and now I understand why you feel confused.

Yes, they both cache globally, I can confirm that. The main difference is that cache_resource stores the object as is while cache_data stores a serialized version of it. But regarding the issue you describe, they both behave the same.

2 Likes