Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

DiscountCategoryMappingCacheEventConsumer.cs

using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Discounts;
using Nop.Services.Caching;

namespace Nop.Services.Discounts.Caching;

/// 
/// Represents a discount-category mapping cache event consumer
/// 
public partial class DiscountCategoryMappingCacheEventConsumer : CacheEventConsumer
{
    protected override async Task ClearCacheAsync(DiscountCategoryMapping entity)
    {
        await RemoveAsync(NopDiscountDefaults.AppliedDiscountsCacheKey, nameof(Category), entity.EntityId);

        await base.ClearCacheAsync(entity);
    }
}