Skip to content
Permalink
Browse files

[Launcher] Use cache but always refresh it, even when installing.

  • Loading branch information
xen2 committed Mar 7, 2019
1 parent 2e1f3fe commit 5a1b80fa2ef620cbb6aef34963ce773a8fcd4f2f
Showing with 3 additions and 3 deletions.
  1. +3 −3 sources/assets/Xenko.Core.Packages/NugetStore.cs
@@ -358,7 +358,7 @@ public async Task<NugetLocalPackage> InstallPackage(string packageId, PackageVer
},
};

using (var context = new SourceCacheContext())
using (var context = new SourceCacheContext { MaxAge = DateTimeOffset.UtcNow })
{
context.IgnoreFailedSources = true;

@@ -576,7 +576,7 @@ public async Task<IEnumerable<NugetServerPackage>> FindSourcePackagesById(string

private async Task FindSourcePackagesByIdHelper(string packageId, List<NugetServerPackage> resultList, SourceRepository [] repositories, CancellationToken cancellationToken)
{
using (var sourceCacheContext = new SourceCacheContext { NoCache = true })
using (var sourceCacheContext = new SourceCacheContext { MaxAge = DateTimeOffset.UtcNow })
{
foreach (var repo in repositories)
{
@@ -657,7 +657,7 @@ public async Task<IEnumerable<NugetPackage>> GetUpdates(PackageName packageName,
var repositories = PackageSources.Select(sourceRepositoryProvider.CreateRepository).ToArray();

var res = new List<NugetPackage>();
using (var context = new SourceCacheContext { NoCache = true })
using (var context = new SourceCacheContext { MaxAge = DateTimeOffset.UtcNow })
{
foreach (var repo in repositories)
{

0 comments on commit 5a1b80f

Please sign in to comment.
You can’t perform that action at this time.