How to cache a script on a build with 100+ projects #4163
Unanswered
FlorianWDP
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A full rebuild of my solution take ~5-6min. When i cached the cake script, i can reduce it to ~4min.
The thing is, when multiple projects try to build in parallel and no cache is present, all of them try to create the cache, which results in an error because the cache file is locked and the projects build fails. On the second try, the build succeeds, as the cache was successfully created by one of the projects. Now, i don't want to have to build twice every time i have to recompile the script.
Is there an best practice to work around this issue?
For further information:
I build through MSBuild in Visual Studio or Rider. I have 2 cake targets that get called in MSBuild Tasks. The cake targets take ~1 second and ~5 seconds respectively per project (according to the cake time summary, i think that does not include script compile time and setup).
That is the reason why i would like to reduce the setup time of cake, as the "logic" of a task is less than the setup in most cases.
Beta Was this translation helpful? Give feedback.
All reactions