2π
β
A solution can be the following:
The view will serve cached results, when a task is completed this one will update the cached results with the fresh ones.
You can also use celery in this way here, when a cached view is hit and it has to be recalculated, a celery task get detached (the view will return the cached value).
Here thereβs an interesting example about a one-at-time celery task:
http://ask.github.com/celery/cookbook/tasks.html
π€Tommaso Barbugli
Source:stackexchange.com