Interface IDatabaseCacheRebuilder
Defines operations for rebuild of the published content cache in the database.
Namespace: Umbraco.Cms.Core.PublishedCache
Assembly: Umbraco.Core.dll
Syntax
public interface IDatabaseCacheRebuilder
Methods
View SourceIsRebuilding()
Indicates if the database cache is in the process of being rebuilt.
Declaration
bool IsRebuilding()
Returns
| Type | Description |
|---|---|
| bool |
IsRebuildingAsync()
Indicates if the database cache is in the process of being rebuilt.
Declaration
Task<bool> IsRebuildingAsync()
Returns
| Type | Description |
|---|---|
| Task<bool> |
Rebuild(bool)
Rebuilds the database cache, optionally using a background thread.
Declaration
[Obsolete("Use RebuildAsync instead. Scheduled for removal in Umbraco 18.")]
void Rebuild(bool useBackgroundThread)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | useBackgroundThread | Flag indicating whether to use a background thread for the operation and immediately return to the caller. |
RebuildAsync(bool)
Rebuilds the database cache, optionally using a background thread.
Declaration
Task<Attempt<DatabaseCacheRebuildResult>> RebuildAsync(bool useBackgroundThread)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | useBackgroundThread | Flag indicating whether to use a background thread for the operation and immediately return to the caller. |
Returns
| Type | Description |
|---|---|
| Task<Attempt<DatabaseCacheRebuildResult>> | An attempt indicating the result of the rebuild operation. |
RebuildDatabaseCacheIfSerializerChanged()
Rebuilds the database cache if the configured serializer has changed.
Declaration
[Obsolete("Use the async version. Scheduled for removal in Umbraco 18.")]
void RebuildDatabaseCacheIfSerializerChanged()
RebuildDatabaseCacheIfSerializerChangedAsync()
Rebuilds the database cache if the configured serializer has changed.
Declaration
Task RebuildDatabaseCacheIfSerializerChangedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing the asynchronous operation. |