Do we really need caching for realtime data?

Hi Team

I am developing a realtime dashboard, where I am reading the data from my database every 1 min, we are making graphs from realtime values.
I have two buttons in dashboard but the switching speed from button 1 to 2 takes lot of time to load data.
Dose caching really helps here? Because values are changing every 1 min.

Ideally you wouldn’t have to load data more often than once a minute. Cache can certainly help with that.

Hi @Goyo Goyo

Thanks for the input.
But in one of the article by streamlit it is mentioned that if your database updates more frequently we should remove caching or use ttl.

I am not sure why caching would be discouraged, using ttl looks appropriate to me.