Interface IServerMessenger
Transmits distributed cache notifications for all servers of a load balanced environment.
Namespace: Umbraco.Cms.Core.Sync
Assembly: Umbraco.Core.dll
Syntax
public interface IServerMessengerRemarks
Also ensures that the notification is processed on the local environment.
Methods
View SourceQueueRefresh(ICacheRefresher, Guid[])
Notifies all servers of specified items invalidation, for a specified ICacheRefresher.
Declaration
void QueueRefresh(ICacheRefresher refresher, params Guid[] guidIds)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
| Guid[] | guidIds | The unique identifiers of the invalidated items. | 
QueueRefresh(ICacheRefresher, Int32[])
Notifies all servers of specified items invalidation, for a specified ICacheRefresher.
Declaration
void QueueRefresh(ICacheRefresher refresher, params int[] numericIds)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
| System.Int32[] | numericIds | The unique identifiers of the invalidated items. | 
QueueRefresh<TPayload>(ICacheRefresher, TPayload[])
Notifies the distributed cache, for a specified ICacheRefresher.
Declaration
void QueueRefresh<TPayload>(ICacheRefresher refresher, TPayload[] payload)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
| TPayload[] | payload | The notification content. | 
Type Parameters
| Name | Description | 
|---|---|
| TPayload | 
QueueRefresh<T>(ICacheRefresher, Func<T, Guid>, T[])
Notifies the distributed cache of specified item invalidation, for a specified ICacheRefresher.
Declaration
void QueueRefresh<T>(ICacheRefresher refresher, Func<T, Guid> getGuidId, params T[] instances)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
| Func<T, 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. | 
QueueRefresh<T>(ICacheRefresher, Func<T, Int32>, T[])
Notifies the distributed cache of specified item invalidation, for a specified ICacheRefresher.
Declaration
void QueueRefresh<T>(ICacheRefresher refresher, Func<T, int> getNumericId, params T[] instances)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
| 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. | 
QueueRefreshAll(ICacheRefresher)
Notifies all servers of a global invalidation for a specified ICacheRefresher.
Declaration
void QueueRefreshAll(ICacheRefresher refresher)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
QueueRemove(ICacheRefresher, Int32[])
Notifies all servers of specified items removal, for a specified ICacheRefresher.
Declaration
void QueueRemove(ICacheRefresher refresher, params int[] numericIds)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
| System.Int32[] | numericIds | The unique identifiers of the removed items. | 
QueueRemove<T>(ICacheRefresher, Func<T, Int32>, T[])
Notifies all servers of specified items removal, for a specified ICacheRefresher.
Declaration
void QueueRemove<T>(ICacheRefresher refresher, Func<T, int> getNumericId, params T[] instances)Parameters
| Type | Name | Description | 
|---|---|---|
| ICacheRefresher | refresher | The ICacheRefresher. | 
| 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. | 
SendMessages()
Called to send/commit the queued messages created with the Perform methods
Declaration
void SendMessages()Sync()
Called to synchronize a server with queued notifications
Declaration
void Sync()