Webiant Logo Webiant Logo
  1. No results found.

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

StoreCacheEventConsumer.cs

using Nop.Core.Caching;
using Nop.Core.Domain.Orders;
using Nop.Core.Domain.Stores;
using Nop.Services.Caching;
using Nop.Services.Localization;

namespace Nop.Services.Stores.Caching;

/// 
/// Represents a store cache event consumer
/// 
public partial class StoreCacheEventConsumer : CacheEventConsumer
{
    /// 
    /// Clear cache data
    /// 
    /// Entity
    /// A task that represents the asynchronous operation
    protected override async Task ClearCacheAsync(Store entity)
    {
        await RemoveByPrefixAsync(NopEntityCacheDefaults.AllPrefix);
        await RemoveByPrefixAsync(NopLocalizationDefaults.LanguagesByStorePrefix, entity);
    }
}