How to Populate Celery Cache in Background

Hey Everyone!

So I’m planning to set up some background schedulers (apscheduler) to make sure that my caches are pre-populated, with the ability for the user to delete the cache and repopulate it themselves if they need fresher data. Some of these are long processes, so I would like to place them in a background callback, and my understanding (from here) is that I should be able to handle the user killing the cache and repopulating it from within the app, but how would I handle accessing that same cache key that is used in the callback, from outside of the context of the dash app? (I currently use flask-caching and hook it up to a celery backend, which I could just continue to do in the body of the background callback function, but I figured I’d see if there were a better way to handle it using the method in the link above embedded in the callback decorator).

Thanks!

Oh I just saw this post here that this is a duplicate of. Will tack my post into the other one and mark this thread as closed.