Running multiple processes
langri-sha opened this issue · 2 comments
I would like to know whether there are any unintended consequences from using cache-loader
from multiple processes writing into the same cache directory?
To give a bit of a background, I would like to create a manager for my project that would handle requests for building checked out project sources in parallel. At the moment, I am constructing a strong hash from the environment for all the loader dependencies that's added as a component to the cache output path.
I am curious if there would be any issues when I try to run two parallel builds when the environments are not different (cache output directories are the same), but my project sources changed? If so, perhaps this is something that might be added to the README
.
Did you have time to test this out ? :)
I am using happypack@4.0.0.
where all each of my loaders are split into 4 processes with their own cache-loader
.
I haven't run into major issues.
There are some hiccups where the cache is stale and it is not being updated automatically (which, at the moment, my team fixes by blowing away all the cache) -- and I personally have not been able to reproduce, but it seems to be related with switching git branches.