scalability improvements
This commit is contained in:
@ -19,12 +19,8 @@ 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}*", true);
|
||||
}
|
||||
// when user is modified (ie. roles) a a site reload event is raised and the site cache item for the user needs to be refreshed
|
||||
if (syncEvent.EntityName == EntityNames.User && syncEvent.Action == SyncEventActions.Reload)
|
||||
{
|
||||
_cache.Remove($"site:{syncEvent.TenantId}:{syncEvent.SiteId}:{syncEvent.EntityId}", true);
|
||||
_cache.Remove($"site:{syncEvent.TenantId}:{syncEvent.EntityId}");
|
||||
_cache.Remove($"modules:{syncEvent.TenantId}:{syncEvent.EntityId}");
|
||||
}
|
||||
|
||||
// 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