Webiant Logo Webiant Logo
  1. No results found.

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

UrlRecordCacheEventConsumer.cs

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

namespace Nop.Services.Seo.Caching;

/// 
/// Represents an URL record cache event consumer
/// 
public partial class UrlRecordCacheEventConsumer : CacheEventConsumer
{
    /// 
    /// Clear cache data
    /// 
    /// Entity
    /// A task that represents the asynchronous operation
    protected override async Task ClearCacheAsync(UrlRecord entity)
    {
        await RemoveAsync(NopSeoDefaults.UrlRecordCacheKey, entity.EntityId, entity.EntityName, entity.LanguageId);
        await RemoveAsync(NopSeoDefaults.UrlRecordBySlugCacheKey, entity.Slug);
        await RemoveAsync(NopSeoDefaults.UrlRecordEntityIdLookupCacheKey, entity.LanguageId);
        await RemoveAsync(NopSeoDefaults.UrlRecordSlugLookupCacheKey);
    }
}