File size: 236 Bytes
569cf30
 
 
f10310e
569cf30
 
 
f10310e
569cf30
 
 
1
2
3
4
5
6
7
8
9
10
11
@st.experimental_memo
def foo(x):
    return x**2

if st.button("Clear Foo"):
    # Clear foo's memoized values:
    foo.clear()

if st.button("Clear All"):
	  # Clear values from *all* memoized functions:
		st.experimental_memo.clear()