Skip to content

Pre-cache on start-up #6108

@BramVanroy

Description

@BramVanroy

The st.cache is really useful (I'm still on 1.13) but I think its user-friendliness can be improved. Now, the first run still takes a long time for the first user. But it would be useful if we can "pre-cache" the result of a function so that even the first user does not have to wait too long for long running processes, e.g. for downloading a ML model behind the scenes. A solution would be to add an option to st.cache like "precache" that accepts a list of dicts, where each dict is a kwarg for the function. On app start up, the function is then run for all those different types of kwargs.

It's just an idea but I think it could be useful!

Views

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:cacheRelated to `st.cache_data` and `st.cache_resource`type:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions