Skip to content

Commit

Permalink
Temporary disable cache to ensure proper dependency resolution when u…
Browse files Browse the repository at this point in the history
…pgrading (#331)
  • Loading branch information
gg3orgiev authored Dec 20, 2024
1 parent ce947ce commit 22f7503
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public NuGetApiClient(ILogger<INuGetApiClient> logger, IEnumerable<INugetProvide

public async Task<NuGetPackage> GetPackageWithFullDependencyTree(string id, string version, IEnumerable<PackageSource> sources, Regex supportedFrameworksRegex = null, Func<NuGetPackage, bool> shouldBreakSearch = null)
{
// First, try to retrieve the data from the local cache
string packageDependenciesHashFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constants.LocalPackagesInfoCacheFolder, string.Concat(id, version));
if (File.Exists(packageDependenciesHashFilePath))
{
return JsonConvert.DeserializeObject<NuGetPackage>(File.ReadAllText(packageDependenciesHashFilePath));
}
//// First, try to retrieve the data from the local cache
//string packageDependenciesHashFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constants.LocalPackagesInfoCacheFolder, string.Concat(id, version));
//if (File.Exists(packageDependenciesHashFilePath))
//{
// return JsonConvert.DeserializeObject<NuGetPackage>(File.ReadAllText(packageDependenciesHashFilePath));
//}

PackageXmlDocumentModel nuGetPackageXmlDoc = await this.GetPackageXmlDocument(id, version, sources);
if (nuGetPackageXmlDoc == null)
Expand All @@ -62,8 +62,8 @@ public async Task<NuGetPackage> GetPackageWithFullDependencyTree(string id, stri
}

// Include the current package in the local cache
Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constants.LocalPackagesInfoCacheFolder));
File.WriteAllText(packageDependenciesHashFilePath, JsonConvert.SerializeObject(nuGetPackage));
//Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constants.LocalPackagesInfoCacheFolder));
//File.WriteAllText(packageDependenciesHashFilePath, JsonConvert.SerializeObject(nuGetPackage));

if (nuGetPackage.Id == null || nuGetPackage.Version == null)
{
Expand Down
4 changes: 2 additions & 2 deletions Sitefinity CLI/Sitefinity CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>sf</AssemblyName>
<RootNamespace>Sitefinity_CLI</RootNamespace>
<AssemblyVersion>1.1.0.58</AssemblyVersion>
<AssemblyVersion>1.1.0.59</AssemblyVersion>
<Version>1.1.0</Version>
<FileVersion>1.1.0.58</FileVersion>
<FileVersion>1.1.0.59</FileVersion>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
Expand Down

0 comments on commit 22f7503

Please sign in to comment.