24 days ago
Hello I want to ask if you have a cronjob, and that it saves something to ephemeral disk (like a cache), and this cronjob completes
In the subsequent iterations of the cronjob, would the same ephemeral disk be loaded with the stale cache contents or would a fresh new one kick in with nothing in ephemeral?
10 Replies
24 days ago
afaik it doesn’t persist between runs
24 days ago
I will test it out once I’m back on my pc, you made me curious
24 days ago
I am running test scripts on it now and it turns out it DOES persist
24 days ago
(no markdown available for this content)
Attachments
24 days ago
i was being plagued with this stale cache entries until i decided to push an update to figure out why (which redeployed and only when redeployed it destroys the ephemeral disk cache)
24 days ago
===
I think it would be good to have a 2nd confirmation
24 days ago
Yes, it can persist inbetween runs but it's not a guaranteed behavior because our scheduler could re-place your cron job onto another machine at any time.
24 days ago
If you want strong stateful guarantees here then you'd need to attach a volume
24 days ago
i see. In fact i need it to be strong stateless 🤣
24 days ago
i guess it doenst hurt just to remove the file after I am done