Hello Dagger team,
We are using Dagger extensively with a shared engine across multiple workloads.
We have configured garbage collection: because disk space fills up quickly on the engine, garbage collection is triggered roughly twice a day.
From our understanding, Dagger relies on different kinds of cache:
• Function cache
• Layer cache
• Volume cache
We would like to better understand how garbage collection behaves across these different cache types.
Context
We suspect we are hitting an issue related to cache eviction:
• The volume cache seems to be pruned by garbage collection
• However, some commands responsible for populating those volumes appear to still be cached at the layer level
• As a result, those commands are not re-executed, and the execution fails because the expected data in the volume is no longer present
Questions
1. Are all cache types (function, layer, volume) garbage-collected in the same way and with the same lifecycle?
2. Is it possible for volume cache to be pruned while the corresponding layers remain cached, leading to this kind of inconsistency?
3. If this behavior is expected, what is the recommended way to avoid this situation?
Thanks in advance for your help and for any guidance you can provide.