Caching data across interactions

Hi streamlit, please help correct me if I’m wrong. I have 50M+ json file to load and play with the data inside. The data itself don’t change, so I try to @st.cache it. The code is like following,

def load_data(filename): 
    data = json.load(open(filename))
    return data

data=load_data("batch101.json")       # the 50M+ file, and type(data)==dict"Category:", list(data.keys()))
id=st.sidebar.slide("Data_id:", min_val=0, max_val=len(data[category])-1)


But each time I interact with the widget, the page will show “Running load_data” and page gets gray for about 5 seconds. It looks like the caching is not working here. Am I doing something wrong? Thanks for any advice.

ah, I found this:


will disable hash checking, now that I am sure the returned data will not change.

Thanks for the awesome job, Streamlit!