Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public static bool IsProductInCache(ResponseCacheLevel productCacheLevel, string

if (cachedProductInfo.TryGetValue(productIdentifier, out var productInfo))
{
if (productInfo is null) return true;
return Equals(currency.Code, productInfo["CurrencyCode"]);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.4.26</Version>
<Version>10.4.27</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>Live Integration</Title>
<Description>Live Integration</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private static bool FetchProductInfosInternal(List<PriceProductSelection> produc
// Parse the response
Dictionary<string, ProductInfo> prices = ProcessResponse(settings, response, logger, context);

if (prices != null && prices.Count > 0)
if (prices != null)
{
if (updateCache)
{
Expand All @@ -225,7 +225,14 @@ private static bool FetchProductInfosInternal(List<PriceProductSelection> produc
cachedProductInfos.Remove(productKey);
cachedProductInfos.Add(productKey, prices[productKey]);
}
}
// Cache empty values for products that were in the request but were not returned in the response

foreach (var priceProductSelection in productsForRequest)
{
var productIdentifier = ProductProvider.GetProductIdentifier(settings, priceProductSelection.Product, priceProductSelection.UnitId);
cachedProductInfos.TryAdd(productIdentifier, null);
}
}
}
}
else
Expand Down
Loading