using Nop.Core.Domain.Localization; using Nop.Services.Caching; namespace Nop.Services.Localization.Caching; /// /// Represents a localized property cache event consumer /// public partial class LocalizedPropertyCacheEventConsumer : CacheEventConsumer { /// /// Clear cache data /// /// Entity /// A task that represents the asynchronous operation protected override async Task ClearCacheAsync(LocalizedProperty entity) { await RemoveAsync(NopLocalizationDefaults.LocalizedPropertyCacheKey, entity.LanguageId, entity.EntityId, entity.LocaleKeyGroup, entity.LocaleKey); await RemoveAsync(NopLocalizationDefaults.LocalizedPropertiesCacheKey, entity.EntityId, entity.LocaleKeyGroup, entity.LocaleKey); await RemoveAsync(NopLocalizationDefaults.LocalizedPropertyLookupCacheKey, entity.LanguageId); } }