I know in most cases, we can cache the data in the first beginning when defining a function to load the data. However, I saw many will also cache the plot function using the same data source. Is it really necessary to do that assuming the data is already cached? Is it helpful to cache all the functions if possible to improve the performance?
If one function is used within another function that is cached, the st.cache() decorator should cache both results. It’s likely the case that using st.cache() everywhere has no effect, either on behavior or performance, but I have not verified that personally.