FruitBank/Libraries/Nop.Services/Blogs/Caching/BlogCommentCacheEventConsum...

20 lines
630 B
C#

using Nop.Core.Domain.Blogs;
using Nop.Services.Caching;
namespace Nop.Services.Blogs.Caching;
/// <summary>
/// Represents a blog comment cache event consumer
/// </summary>
public partial class BlogCommentCacheEventConsumer : CacheEventConsumer<BlogComment>
{
/// <summary>
/// Clear cache data
/// </summary>
/// <param name="entity">Entity</param>
/// <returns>A task that represents the asynchronous operation</returns>
protected override async Task ClearCacheAsync(BlogComment entity)
{
await RemoveByPrefixAsync(NopBlogsDefaults.BlogCommentsNumberPrefix, entity.BlogPostId);
}
}