Time Based Cache

Is there any way I can cache the data in my app for a set period of time? We have a backend process that only updated the database every 3 hours so would like to limit the querying of the database whilst it’s not updating in the backend.


This is a highly requested feature, tracked here, which I believe we intend to implement soon. Please follow that issue to see when we start implementing it.

In the meantime, this trick lets you add a ttl (time to live) parameter to st.cache().

Happy app building! :heart:

1 Like