User A & B has different data to show but the result shows the same data

Hello, I’m new here.

I create an app to enable librarians to use topic modeling. However, when I use st.cache_data and it works when I try it on 2 different browsers. But the problem appears when I try to use Biterm which needs time to calculate. When I try to compute it at the same time with different data, the graph shows the same data and is sometimes stacked with other data.

Is it possible when 2 or more users accessing the app with different data at the same time to have their own cache?

Hi @faizhalas ,

It looks like your app code may in some cases use the same input parameters for the cached function across different data / files. For example the clean_csv() function and various Vis_*() functions in your app take no input parameters, so they will return the same first-computed value on every run.

Some of these may not need to be cached, alternatively you could add some parameter which will be unique for different files / data so caching knows to re-compute.

See more about the behavior and examples at link below. I hope it helps! Looks like a cool app!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.