Summary
I have my streamlit functions built in a class. This class has self attributes (variables), and they change really often, from 3 to 10 seconds approximately. These variables are data being received from a websocket server which as far as I understand, is being shared in all sessions because I’m using @st.cache_resource decorator.
Now the problem I have is that I cant get to share the same variables to all the sessions. For example, if now I enter the website and start using it, data will start coming in, but if another user comes in, it wont be able to access the self attributes that the other users session has. I would like that to happen and I dont know how.
[UPDATE]
Should I have self attributes stored in a json instead, and get this data from the json so that all users have the same data? I would have a separate script that updates this json file. Now, my concern would be, will streamlit know when the data in the json changes so that it updates what the users sees? Thanks!