Hello,
I am looking for input about the CacheSharingMode.
The doc is quite light => https://dagger-io.readthedocs.io/en/sdk-python-v0.5.3/api.html#dagger.api.gen.CacheSharingMode
We are using dagger in our CI with a lot of parallel builds.
We are mounting node_modules (or other packages for other technologies) to avoid downloading the dependencies every time.
Using SHARED volumes results in cache corruption.
Using LOCKED volumes results in blocked FS and very slow builds.
The final solution is PRIVATE. It allows parallel builds without cache corruption but I don't quite understand from the doc if the node_modules is indeed shared or simply duplicated per project.
I asked claude and it tells me this =>
Shared Base Data: The underlying cached data (your node_modules) is stored once in Dagger's cache storage
Copy-on-Write: When you run parallel builds, each gets a "snapshot" view of the cache volume
Efficient Storage: Only the differences/changes between parallel executions are stored separately
Read Operations: Multiple concurrent reads access the same underlying data
Write Operations: Only writes create new layers/snapshots on top of the shared base
Is this correct or total crap ?