Hi Dynamicweb,
We have experienced an issue with caching of sales discounts in 8.8.1 which seems to be done by the website language (and not also by the chosen currency):
Private Shared Function GetCachedDiscounts(ByVal language As Language) As SalesDiscountCollection
Const key As String = "SalesDiscounts"
Dim discounts As SalesDiscountCollection
Dim caches As Dictionary(Of String, SalesDiscountCollection) = Nothing
Dim storage As Content.Caching.Storage = Content.Caching.StorageManager.Current.GetStorage("eCommerce")
Dim ret As SalesDiscountCollection
If storage.Contains(key) Then
caches = storage.Get(Of Dictionary(Of String, SalesDiscountCollection))(key)
End If
If IsNothing(caches) OrElse Not caches.ContainsKey(language.LanguageID) Then
caches = New Dictionary(Of String, SalesDiscountCollection)()
For Each aLanguage As Language In language.getLanguages()
ret = New SalesDiscountCollection
discounts = New SalesDiscountCollection()
discounts.Load("SELECT * FROM EcomSalesDiscount ORDER BY SalesDiscountID", aLanguage)
For Each d As SalesDiscount In discounts
ret.Add(d)
Next
caches.Add(aLanguage.LanguageID, ret)
Next
storage.Insert(key, caches)
End If
Return caches(language.LanguageID)
End Function
The issue is that you add a discount code (http://screencast.com/t/4YLZCfcdhE) and afterwards change the currency of the website, which does not invalid the cache of discount providers.
Can you reproduce the behaviour and have we hit a (critical) bug?
Best regards, Anders