Invalidate cache upon pics changes

PICS restart indicates that we don't know what changes exactly we've missed. If package doesn't emit any change number (and it doesn't have to), we might miss the update that happened in the meantime without being aware of that happening.
This commit is contained in:
JustArchi
2021-01-03 21:37:16 +01:00
parent c7547e3b40
commit 273a6b0fbe
4 changed files with 49 additions and 20 deletions

View File

@@ -22,6 +22,7 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Composition;
using System.Globalization;
using System.Linq;
@@ -258,7 +259,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
HashSet<uint> appIDsToRefresh = new();
foreach (uint packageID in packageIDs) {
if (!ASF.GlobalDatabase.PackagesDataReadOnly.TryGetValue(packageID, out (uint ChangeNumber, HashSet<uint>? AppIDs) packageData) || (packageData.AppIDs == null)) {
if (!ASF.GlobalDatabase.PackagesDataReadOnly.TryGetValue(packageID, out (uint ChangeNumber, ImmutableHashSet<uint>? AppIDs) packageData) || (packageData.AppIDs == null)) {
// ASF might not have the package info for us at the moment, we'll retry later
continue;
}