Hi @Walter-Ullon, welcome to the Streamlit community!
Yes, caching is the behavior you want to use here. Things like loading data, computations and the like where the same input returns the same output are great candidates for caching. If you’re just getting started, I would suggest using st.experimental_memo and st.singleton, as these two are where the library is moving and away from st.cache.
Best,
Randy