From 515201b7bdd0d9ee81b05a9bdc1e2ae9293112a6 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:54:55 -0500 Subject: [PATCH] Revert "Merge pull request #764 from lamkin/drl/st_cache_deprecated" This reverts commit d60f59e6faa107c9bdbc8d21507f8bcc69a40bd1, reversing changes made to 502137bf787f128ad061635efa9664484efe2405. --- scripts/plotly_streamlit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/plotly_streamlit.py b/scripts/plotly_streamlit.py index 29392a8..fe8fa08 100755 --- a/scripts/plotly_streamlit.py +++ b/scripts/plotly_streamlit.py @@ -38,7 +38,8 @@ st.markdown(""" """, unsafe_allow_html=True) -@st.cache_resource() +@st.cache(hash_funcs={Connection: id}) +# @st.cache(allow_output_mutation=True) def get_connection(path: str): return sqlite3.connect(path, check_same_thread=False) @@ -88,7 +89,7 @@ else: # end_date = datetime(2022 ,5 ,17).date() -@st.cache_data() +@st.cache() def date_filter(df, start_date, end_date): filt = (df2.index >= pd.Timestamp(start_date)) & (df2.index <= pd.Timestamp(end_date + timedelta(days=1))) df = df[filt] @@ -131,7 +132,7 @@ else: resample_time = resample_times[resample_sel] -@st.cache_data() +@st.cache() def time_resample(df, resample_time): if resample_time == 'Raw': df_resample = df['Com_Name']