While trying to understand and fix Interaction between joblib and streamlit.cache, I’ve spotted something that I don’t understand at all:

```
# I'm not even importing streamlit!
# import streamlit as st
import time
do_sleep = True
def work(x):
print("processing input", x)
if do_sleep:
time.sleep(1)
return x * x
for i in range(1, 4):
print("starting task", i)
result = work(i)
print("result", result)
```

Standard output:

```
starting task 1
processing input 1
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://10.0.0.212:8501
starting task 1
processing input 1
result 1
starting task 2
processing input 2
result 1
starting task 2
processing input 2
result 4
starting task 3
processing input 3
result 4
starting task 3
processing input 3
result 9
starting task 1
processing input 1
result 9
result 1
starting task 2
processing input 2
result 4
starting task 3
processing input 3
result 9
```

I don’t use streamlit cache. Why does the app decide to restart?