Interface ICacheInstructionService
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface ICacheInstructionService
Methods
View SourceDeliverInstructions(IEnumerable<RefreshInstruction>, String)
Creates a cache instruction record from a set of individual instructions and saves it.
Declaration
void DeliverInstructions(IEnumerable<RefreshInstruction> instructions, string localIdentity)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<RefreshInstruction> | instructions | |
System.String | localIdentity |
DeliverInstructionsInBatches(IEnumerable<RefreshInstruction>, String)
Creates one or more cache instruction records based on the configured batch size from a set of individual instructions and saves them.
Declaration
void DeliverInstructionsInBatches(IEnumerable<RefreshInstruction> instructions, string localIdentity)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<RefreshInstruction> | instructions | |
System.String | localIdentity |
GetMaxInstructionId()
Gets the most recent cache instruction record Id.
Declaration
int GetMaxInstructionId()
Returns
Type | Description |
---|---|
System.Int32 |
IsColdBootRequired(Int32)
Checks to see if a cold boot is required, either because instructions exist and none have been synced or because the last recorded synced instruction can't be found in the database.
Declaration
bool IsColdBootRequired(int lastId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lastId |
Returns
Type | Description |
---|---|
System.Boolean |
IsInstructionCountOverLimit(Int32, Int32, out Int32)
Checks to see if the number of pending instructions are over the configured limit.
Declaration
bool IsInstructionCountOverLimit(int lastId, int limit, out int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lastId | |
System.Int32 | limit | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Boolean |
ProcessInstructions(CacheRefresherCollection, ServerRole, CancellationToken, String, DateTime, Int32)
Processes and then prunes pending database cache instructions.
Declaration
ProcessInstructionsResult ProcessInstructions(CacheRefresherCollection cacheRefreshers, ServerRole serverRole, CancellationToken cancellationToken, string localIdentity, DateTime lastPruned, int lastId)
Parameters
Type | Name | Description |
---|---|---|
CacheRefresherCollection | cacheRefreshers | Cache refreshers. |
ServerRole | serverRole | Server role. |
CancellationToken | cancellationToken | Cancellation token. |
System.String | localIdentity | Local identity of the executing AppDomain. |
DateTime | lastPruned | Date of last prune operation. |
System.Int32 | lastId | Id of the latest processed instruction |
Returns
Type | Description |
---|---|
ProcessInstructionsResult |