improve caching for static rendering
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Oqtane.Extensions;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
|
||||
@ -18,7 +19,7 @@ namespace Oqtane.Infrastructure.EventSubscribers
|
||||
// when site entities change (ie. site, pages, modules, etc...) a site refresh event is raised and the site cache item needs to be refreshed
|
||||
if (syncEvent.EntityName == EntityNames.Site && syncEvent.Action == SyncEventActions.Refresh)
|
||||
{
|
||||
_cache.Remove($"site:{syncEvent.TenantId}:{syncEvent.EntityId}");
|
||||
_cache.Remove($"site:{syncEvent.TenantId}:{syncEvent.EntityId}*", true);
|
||||
}
|
||||
|
||||
// when a site entity is updated the hosting model may have changed, so the client assemblies cache items need to be refreshed
|
||||
|
Reference in New Issue
Block a user