tag:help.appveyor.com,2012-11-13:/discussions/questions/39698-using-cache-for-packages-slows-down-build-timeAppVeyor: Discussion 2019-07-22T21:39:29Ztag:help.appveyor.com,2012-11-13:Comment/474613862019-07-22T18:19:29Z2019-07-22T18:19:55ZUsing cache for packages slows down build time<div><p>Hi,</p>
<p>I have enabled cache for .nuget packages, and build times seem to go up with the cache. Examples:<br></p>
<pre>
<code>+ 0.1.21: 1 min 28 sec - WITHOUT
+ 0.1.20: 1 min 56 sec - WITH
+ 0.1.19: 2 min 03 sec - WITH
+ 0.1.18: 2 min 34 sec - WITH
+ 0.1.17: 1 min 30 sec - WITHOUT
+ 0.1.16: 1 min 37 sec - WITHOUT
...</code>
</pre>
<p>I'm using<br></p>
<pre>
<code># build cache to preserve files/folders between builds
cache:
- '%USERPROFILE%.nuget\packages -> *<em>*.sln, *</em>*.csproj' # preserve nuget folder (packages) unless the solution or projects change<br><br>
<br>before_build:
- nuget restore myApp.sln<br><br>
<br>build:
project: myApp.sln # path to Visual Studio solution or project</code>
</pre>
<p>Anything to look for on what causes this? Nuget packages seems to be one of the recommended usages of the cache.</p>
<p>Thanks,<br>
Raul.</p></div>raultag:help.appveyor.com,2012-11-13:Comment/474613862019-07-22T21:35:43Z2019-07-22T21:35:43ZUsing cache for packages slows down build time<div><p>The cache needs to populate within multiple data centers so it may take some number of builds before performance gains can be realized.<br>
After how many are you measuring?</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/474613862019-07-22T21:39:28Z2019-07-22T21:39:28ZUsing cache for packages slows down build time<div><p>The small count you see above. I can enable it for the project and report back in a few days.</p></div>raul