Interface IServerMessenger
Broadcasts distributed cache notifications to all servers of a load balanced environment.
Namespace: Umbraco.Core.Sync
Assembly: Umbraco.Core.dll
Syntax
public interface IServerMessenger
Remarks
Also ensures that the notification is processed on the local environment.
Methods
View SourcePerformRefresh(ICacheRefresher, Guid[])
Notifies all servers of specified items invalidation, for a specified ICacheRefresher.
Declaration
void PerformRefresh(ICacheRefresher refresher, params Guid[] guidIds)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
System.Guid[] | guidIds | The unique identifiers of the invalidated items. |
PerformRefresh(ICacheRefresher, Int32[])
Notifies all servers of specified items invalidation, for a specified ICacheRefresher.
Declaration
void PerformRefresh(ICacheRefresher refresher, params int[] numericIds)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
System.Int32[] | numericIds | The unique identifiers of the invalidated items. |
PerformRefresh(ICacheRefresher, String)
Notifies the distributed cache, for a specified ICacheRefresher.
Declaration
void PerformRefresh(ICacheRefresher refresher, string jsonPayload)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
System.String | jsonPayload | The notification content. |
PerformRefresh<TPayload>(ICacheRefresher, TPayload[])
Notifies the distributed cache, for a specified ICacheRefresher.
Declaration
void PerformRefresh<TPayload>(ICacheRefresher refresher, TPayload[] payload)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
TPayload[] | payload | The notification content. |
Type Parameters
Name | Description |
---|---|
TPayload |
PerformRefresh<T>(ICacheRefresher, Func<T, Guid>, T[])
Notifies the distributed cache of specified item invalidation, for a specified ICacheRefresher.
Declaration
void PerformRefresh<T>(ICacheRefresher refresher, Func<T, Guid> getGuidId, params T[] instances)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
System.Func<T, System.Guid> | getGuidId | A function returning the unique identifier of items. |
T[] | instances | The invalidated items. |
Type Parameters
Name | Description |
---|---|
T | The type of the invalidated items. |
PerformRefresh<T>(ICacheRefresher, Func<T, Int32>, T[])
Notifies the distributed cache of specified item invalidation, for a specified ICacheRefresher.
Declaration
void PerformRefresh<T>(ICacheRefresher refresher, Func<T, int> getNumericId, params T[] instances)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
System.Func<T, System.Int32> | getNumericId | A function returning the unique identifier of items. |
T[] | instances | The invalidated items. |
Type Parameters
Name | Description |
---|---|
T | The type of the invalidated items. |
PerformRefreshAll(ICacheRefresher)
Notifies all servers of a global invalidation for a specified ICacheRefresher.
Declaration
void PerformRefreshAll(ICacheRefresher refresher)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
PerformRemove(ICacheRefresher, Int32[])
Notifies all servers of specified items removal, for a specified ICacheRefresher.
Declaration
void PerformRemove(ICacheRefresher refresher, params int[] numericIds)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
System.Int32[] | numericIds | The unique identifiers of the removed items. |
PerformRemove<T>(ICacheRefresher, Func<T, Int32>, T[])
Notifies all servers of specified items removal, for a specified ICacheRefresher.
Declaration
void PerformRemove<T>(ICacheRefresher refresher, Func<T, int> getNumericId, params T[] instances)
Parameters
Type | Name | Description |
---|---|---|
ICacheRefresher | refresher | The ICacheRefresher. |
System.Func<T, System.Int32> | getNumericId | A function returning the unique identifier of items. |
T[] | instances | The removed items. |
Type Parameters
Name | Description |
---|---|
T | The type of the removed items. |