Knowing when cache expires or DurationField is done

12 views
Skip to first unread message

Yoo

unread,
Aug 24, 2019, 5:12:12 PM8/24/19
to Django users
1. Using celery to make a replacement cache when that specific expires, but not sure how to do it.
2. Along the same lines, I need to also know when a DurationField is at "zero." Not sure how a DurationField works though. Again, need celery to be able to execute something when a specific record has its attribute hit the "zero" on its "timer."

If there are other ways, lemme know!

Thanks!

Yoo

unread,
Aug 24, 2019, 5:15:03 PM8/24/19
to Django users
Just to clarify the first point: celery is "updating" the cache with new info once the cache expires; hence the need for the cache to expire. I thought about using a DB table, but also thought about how wasteful it would be to keep a DurationField (which I still don't know how to use) to log when celery should execute a task.
Reply all
Reply to author
Forward
0 new messages