diff --git a/suzieq/gui/stlit/guiutils.py b/suzieq/gui/stlit/guiutils.py index a756fcb40f..4873ea13f4 100644 --- a/suzieq/gui/stlit/guiutils.py +++ b/suzieq/gui/stlit/guiutils.py @@ -60,11 +60,11 @@ def display_help_icon(url: str): unsafe_allow_html=True) -@st.cache(ttl=90, allow_output_mutation=True, show_spinner=False, - max_entries=20) +@st.experimental_memo(ttl=90, show_spinner=False, max_entries=20) def gui_get_df(table: str, config_file: str, verb: str = 'get', **kwargs) -> pd.DataFrame: + """Get the cached value of the table provided The only verbs supported are get and find. diff --git a/suzieq/gui/stlit/path.py b/suzieq/gui/stlit/path.py index 5105c29c89..abe205e240 100644 --- a/suzieq/gui/stlit/path.py +++ b/suzieq/gui/stlit/path.py @@ -318,7 +318,7 @@ def _path_summarize(self, path_df: pd.DataFrame) -> pd.DataFrame: .convert_dtypes() # pylint: disable=too-many-statements - @st.cache(max_entries=10, allow_output_mutation=True) + @st.experimental_memo(max_entries=10) def _build_graphviz_obj(self, show_ifnames: bool, df: pd.DataFrame): '''Return a graphviz object''' diff --git a/suzieq/gui/stlit/status.py b/suzieq/gui/stlit/status.py index a8db13a2ff..f329a7744b 100644 --- a/suzieq/gui/stlit/status.py +++ b/suzieq/gui/stlit/status.py @@ -53,7 +53,7 @@ def _create_sidebar(self) -> None: on_change=self._sync_state) if do_refresh: - st.caching.clear_memo_cache() + st.experimental_memo.clear() st.sidebar.markdown( '''This page provides an overview of the overall network status @@ -66,9 +66,10 @@ def _create_sidebar(self) -> None: you want to search. You can specify multiple addresses, space separated. See the search page for more help. * __Config__: View a device's configuration (show running-config equivalent. - Compare the config of 2 devices side-by-side, or the same device's - config at different times. Specify a string (like 'router ospf') or - regexp (^router ospf) to see specific sections of a config. + Compare the config of 2 devices side-by-side, or the same + device's config at different times. Specify a string (like + 'router ospf') or regexp (^router ospf) to see specific sections + of a config. __Caching is enabled by default for 90 secs on all pages__. You can clear the cache by hitting the refresh button on this page or selecting "Clear Cache"