Webiant Logo Webiant Logo
  1. No results found.

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

ProductTagCacheEventConsumer.cs

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

namespace Nop.Services.Catalog.Caching;

/// <summary>
/// Represents a product tag cache event consumer
/// </summary>
public partial class ProductTagCacheEventConsumer : CacheEventConsumer<ProductTag>
{
    /// <summary>
    /// Clear cache by entity event type
    /// </summary>
    /// <param name="entity">Entity</param>
    /// <param name="entityEventType">Entity event type</param>
    /// <returns>A task that represents the asynchronous operation</returns>
    protected override async Task ClearCacheAsync(ProductTag entity, EntityEventType entityEventType)
    {
        await RemoveByPrefixAsync(NopEntityCacheDefaults<ProductTag>.Prefix);
    }
}