The problem is that the prices are being cached (i think), I notice that the PerformTask is reached once for each product, I assume that the values are being cached, because the PerformTask function is not called after the initial call, only when I restart application or save some products.
That's not the desired situation, because in that way other users are getting the same prices displayed.
Is there some way to disable the cache for the datamodifiers?
Is there another way of modifying the prices throughout the whole site.
I disabled the cache in the VirtualContentCache, so the DataModifierTask is always called, it's a dirty sollution, please help if there is another way.
--
/// <summary>
/// Gets the virtual content by it's unique key.
/// </summary>
/// <param name="key">
/// The key.
/// </param>
/// <returns>
/// The virtual <see cref="IPublishedContent"/>.
/// </returns>
public TContent GetByKey(Guid key)
{
var cacheKey = GetCacheKey(key, ModifiedVersion);
//var content = (TContent)_cache.RuntimeCache.GetCacheItem(cacheKey);
//if (content != null) return content;
return _fetch != null ?
CacheContent(cacheKey, _fetch.Invoke(key)) :
default(TContent);
}
Customer price by ProductVariantDataModifierTaskBase is being cached
Good day,
I successfully implemented my own ProductVariantDataModifierTaskBase class to handle customer based prices, the way described in this post: https://our.umbraco.com/projects/collaboration/merchello/merchello/73758-how-to-implement-this-type-of-discounts
The problem is that the prices are being cached (i think), I notice that the PerformTask is reached once for each product, I assume that the values are being cached, because the PerformTask function is not called after the initial call, only when I restart application or save some products. That's not the desired situation, because in that way other users are getting the same prices displayed.
Is there some way to disable the cache for the datamodifiers? Is there another way of modifying the prices throughout the whole site.
Many tanks in advance.
Update ----
I disabled the cache in the VirtualContentCache, so the DataModifierTask is always called, it's a dirty sollution, please help if there is another way.
--
is working on a reply...