If you move the slider back to a number Streamlit has seen before, the cache is hit and the app is fast as expected.
In computer science terms, what is happening here is that @st.cache is memoizing expensive_computation(a, b).
But now let's go one step further! Try the following:
Move the slider to a number you haven't tried before, such as 9.
Pretend you're another user by opening another browser tab pointing to your Streamlit app (usually at http://localhost:8501)
In the new tab, move the slider to 9.
Notice how this is actually a cache hit! That is, you don't actually see the "Cache miss" text on the second tab even though that second user never moved the slider to 9 at any point prior to this.
This happens because the Streamlit cache is global to all users. So everyone contributes to everyone else's performance.
