View Source
Class CacheInstructionService
Inheritance
System.Object
Assembly: Umbraco.Infrastructure.dll
Syntax
public class CacheInstructionService : RepositoryService, IService, ICacheInstructionService
Constructors
View Source
CacheInstructionService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, ICacheInstructionRepository, IProfilingLogger, ILogger<CacheInstructionService>, IOptions<GlobalSettings>)
Declaration
public CacheInstructionService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, ICacheInstructionRepository cacheInstructionRepository, IProfilingLogger profilingLogger, ILogger<CacheInstructionService> logger, IOptions<GlobalSettings> globalSettings)
Parameters
Methods
View Source
DeliverInstructions(IEnumerable<RefreshInstruction>, String)
Declaration
public void DeliverInstructions(IEnumerable<RefreshInstruction> instructions, string localIdentity)
Parameters
| Type |
Name |
Description |
| IEnumerable<RefreshInstruction> |
instructions |
|
| System.String |
localIdentity |
|
View Source
DeliverInstructionsInBatches(IEnumerable<RefreshInstruction>, String)
Declaration
public void DeliverInstructionsInBatches(IEnumerable<RefreshInstruction> instructions, string localIdentity)
Parameters
| Type |
Name |
Description |
| IEnumerable<RefreshInstruction> |
instructions |
|
| System.String |
localIdentity |
|
View Source
GetMaxInstructionId()
Gets the most recent cache instruction record Id.
Declaration
public int GetMaxInstructionId()
Returns
| Type |
Description |
| System.Int32 |
|
View Source
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
public bool IsColdBootRequired(int lastId)
Parameters
| Type |
Name |
Description |
| System.Int32 |
lastId |
|
Returns
| Type |
Description |
| System.Boolean |
|
View Source
IsInstructionCountOverLimit(Int32, Int32, out Int32)
Checks to see if the number of pending instructions are over the configured limit.
Declaration
public 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 |
|
View Source
ProcessInstructions(CacheRefresherCollection, ServerRole, CancellationToken, String, DateTime, Int32)
Declaration
public ProcessInstructionsResult ProcessInstructions(CacheRefresherCollection cacheRefreshers, ServerRole serverRole, CancellationToken cancellationToken, string localIdentity, DateTime lastPruned, int lastId)
Parameters
| Type |
Name |
Description |
| CacheRefresherCollection |
cacheRefreshers |
|
| ServerRole |
serverRole |
|
| CancellationToken |
cancellationToken |
|
| System.String |
localIdentity |
|
| DateTime |
lastPruned |
|
| System.Int32 |
lastId |
|
Returns