The data on my app is released monthly, on a date that isn’t the same every month (sometimes the 5th, sometimes the 8th, and so on).
When the data is released I need the user to immediately have access to the new data, but at the same time, knowing the data won’t change for a whole month, I want to use “@st.cache_data” to cache the data until the next release, so that the database API requests/minute limit isn’t reached with various users using it simultaneously.
So my first question is, when I’m logged to my app and I use the “clear cache” button does it clear it just for me or for all users using the app? If for all users that would be a solution, to put an almost infinite ttl argument for cache data such as “@st.cache_data(ttl=999999999)” and clear cache manually when the new data is released.
Another option would be to reboot the app. Does rebooting the app clear the cached data for all users?
If someone can think of another strategy, it would also be greatly appreciated.
- Streamlit version: 1.21.0
- Python version: 3.9
- Using Conda? PipEnv? PyEnv? Pex? → no to all
- OS version: Windows 10
- Browser version: Chrome 112