First congratulations for the nopCommerce 4.7 release!
We are on the final testing stages before releasing all our products for nopCommerce 4.7 but while testing we noticed an issue with the caching that affects all our products.
We do try to have as much caching as possible so that there are no unnecessary trips to the database so we have some cache keys that depend on several entities.
So we use the entity cache prefixes in order to invalidate any such cache keys.
For example in our HTML Widgets plugins we depend on Condition, CustomerOverride, ProductOverride etc. entities and we build our cache keys like this:
public static CacheKey ProductHtmlWidgetsForWidgetCacheKey =>
new CacheKey("SevenSpikes.Nop.Plugins.HtmlWidgets." + "{0}-{1}-{2}-{3}-{4}-{5}-{6}-{7}-{8}",
NopEntityCacheDefaults<EntityWidgetMapping>.AllPrefix,
NopEntityCacheDefaults<Condition>.AllPrefix,
NopEntityCacheDefaults<ConditionGroup>.AllPrefix,
NopEntityCacheDefaults<ConditionStatement>.AllPrefix,
NopEntityCacheDefaults<EntityCondition>.AllPrefix,
NopEntityCacheDefaults<CustomerOverride>.AllPrefix,
NopEntityCacheDefaults<ProductOverride>.AllPrefix);
This code has been working fine since nopCommerce 4.4 but now in 4.7 it does not seem to be working and this cache key is not invalidated/cleared when any of these prefixes have been cleared i.e when a condition entity has been deleted and the NopEntityCacheDefaults<Condition>.AllPrefix cache has been cleared by its EventCacheConsumer<Condition>.
We noticed that the CacheManager has been refactored and probably during that refactoring something has been changed and this is no longer working.
We would appreciated if you can look at it and fix it!
Thanks,
Nop-Templates.com team