You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/library/advanced-features/caching.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -883,12 +883,11 @@ We introduced the caching commands described above in Streamlit 1.18.0. Before t
883
883
884
884
If your app is still using `st.cache`, don't despair! Here are a few notes on migrating:
885
885
886
-
-`st.cache` is deprecated. • New versions of Streamlit will show a deprecation warning if your app uses it.
886
+
- Streamlit will show a deprecation warning if your app uses `st.cache`.
887
887
- We will not remove `st.cache` soon, so you don't need to worry about your 2-year-old app breaking. But we encourage you to try the new commands going forward – they will be way less annoying!
888
888
- Switching code to the new commands should be easy in most cases. To decide whether to use `st.cache_data` or `st.cache_resource`, read [Deciding which caching decorator to use](#deciding-which-caching-decorator-to-use). Streamlit will also recognize common use cases and show hints right in the deprecation warnings.
889
889
- Most parameters from `st.cache` are also present in the new commands, with a few exceptions:
890
890
-`allow_output_mutation` does not exist anymore. You can safely delete it. Just make sure you use the right caching command for your use case.
891
-
-`suppress_st_warning` does not exist anymore. You can safely delete it. Cached functions can now contain Streamlit commands and will replay them. If you want to use widgets inside cached functions, set `experimental_allow_widgets=True`. See [here](#using-streamlit-commands-in-cached-functions).
892
-
-`hash_funcs` does not exist anymore. You can exclude parameters from caching (and being hashed) by prepending them with an underscore: `_excluded_param`. See [here](#excluding-input-parameters).
891
+
-`suppress_st_warning` does not exist anymore. You can safely delete it. Cached functions can now contain Streamlit commands and will replay them. If you want to use widgets inside cached functions, set `experimental_allow_widgets=True`. See [Input widgets](#input-widgets) for an example.
893
892
894
893
If you have any questions or issues during the migration process, please contact us on the [forum](https://discuss.streamlit.io/), and we will be happy to assist you. 🎈
0 commit comments