Interface ILastSyncedRepository
Handles saving and pruning of the LastSynced database table.
Namespace: Umbraco.Cms.Core.Persistence.Repositories
Assembly: Umbraco.Core.dll
Syntax
public interface ILastSyncedRepository
Methods
View SourceDeleteEntriesOlderThanAsync(DateTime)
Deletes entries older than the set parameter. This method also removes any entries where both IDs are higher than the lowest synced CacheInstruction ID.
Declaration
Task DeleteEntriesOlderThanAsync(DateTime pruneDate)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | pruneDate | Any date entries in the DB before this parameter, will be removed from the Database. |
Returns
| Type | Description |
|---|---|
| Task |
GetExternalIdAsync()
Fetches the last synced external ID from the database.
Declaration
Task<int?> GetExternalIdAsync()
Returns
| Type | Description |
|---|---|
| Task<int?> | The External ID from the database. |
GetInternalIdAsync()
Fetches the last synced internal ID from the database.
Declaration
Task<int?> GetInternalIdAsync()
Returns
| Type | Description |
|---|---|
| Task<int?> | The Internal ID from the database. |
SaveExternalIdAsync(int)
Saves the last synced External ID to the Database.
Declaration
Task SaveExternalIdAsync(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The last synced external ID. |
Returns
| Type | Description |
|---|---|
| Task |
SaveInternalIdAsync(int)
Saves the last synced Internal ID to the Database.
Declaration
Task SaveInternalIdAsync(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The last synced internal ID. |
Returns
| Type | Description |
|---|---|
| Task |