handle cache invalidation for site groups
This commit is contained in:
@@ -70,6 +70,7 @@ namespace Oqtane.Controllers
|
|||||||
{
|
{
|
||||||
siteGroup = _siteGroupRepository.AddSiteGroup(siteGroup);
|
siteGroup = _siteGroupRepository.AddSiteGroup(siteGroup);
|
||||||
_syncManager.AddSyncEvent(_alias, EntityNames.SiteGroup, siteGroup.SiteGroupDefinitionId, SyncEventActions.Create);
|
_syncManager.AddSyncEvent(_alias, EntityNames.SiteGroup, siteGroup.SiteGroupDefinitionId, SyncEventActions.Create);
|
||||||
|
_syncManager.AddSyncEvent(_alias, EntityNames.Site, siteGroup.SiteId, SyncEventActions.Refresh);
|
||||||
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Site Group Added {SiteGroup}", siteGroup);
|
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Site Group Added {SiteGroup}", siteGroup);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -90,6 +91,7 @@ namespace Oqtane.Controllers
|
|||||||
{
|
{
|
||||||
siteGroup = _siteGroupRepository.UpdateSiteGroup(siteGroup);
|
siteGroup = _siteGroupRepository.UpdateSiteGroup(siteGroup);
|
||||||
_syncManager.AddSyncEvent(_alias, EntityNames.SiteGroup, siteGroup.SiteGroupDefinitionId, SyncEventActions.Update);
|
_syncManager.AddSyncEvent(_alias, EntityNames.SiteGroup, siteGroup.SiteGroupDefinitionId, SyncEventActions.Update);
|
||||||
|
_syncManager.AddSyncEvent(_alias, EntityNames.Site, siteGroup.SiteId, SyncEventActions.Refresh);
|
||||||
_logger.Log(LogLevel.Information, this, LogFunction.Update, "Site Group Updated {SiteGroup}", siteGroup);
|
_logger.Log(LogLevel.Information, this, LogFunction.Update, "Site Group Updated {SiteGroup}", siteGroup);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -111,6 +113,7 @@ namespace Oqtane.Controllers
|
|||||||
{
|
{
|
||||||
_siteGroupRepository.DeleteSiteGroup(id);
|
_siteGroupRepository.DeleteSiteGroup(id);
|
||||||
_syncManager.AddSyncEvent(_alias, EntityNames.SiteGroup, siteGroup.SiteGroupId, SyncEventActions.Delete);
|
_syncManager.AddSyncEvent(_alias, EntityNames.SiteGroup, siteGroup.SiteGroupId, SyncEventActions.Delete);
|
||||||
|
_syncManager.AddSyncEvent(_alias, EntityNames.Site, siteGroup.SiteId, SyncEventActions.Refresh);
|
||||||
_logger.Log(LogLevel.Information, this, LogFunction.Delete, "Site Group Deleted {SiteGroupId}", id);
|
_logger.Log(LogLevel.Information, this, LogFunction.Delete, "Site Group Deleted {SiteGroupId}", id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user