Add refresh feature to cache #8645
Labels
feature:cache
Related to st.cache_data and st.cache_resource
type:enhancement
Requests for feature enhancements or new features
Checklist
Summary
Current cache is very simple and developer can not avoid user from waiting since cache only refresh after expired.
For example, a function takes 1min, cached 1 hour. User have to wait 1min every hour.
The refresh idea is return cached result but still run the decorated function and refresh cache in the background.
Why?
Make user do not hang on any cached function.
How?
There can be two implementation.
Cache-control: no-cache
, force rerun cached function before ttl and store result into cache. developer can trigger it by cron and keep cache always available for user.Additional Context
No response
The text was updated successfully, but these errors were encountered: