Class Suspendable.PageCacheRefresher
Provides functionality to refresh the page cache in a manner that can be suspended and resumed. This is typically used to temporarily halt cache updates during bulk operations or maintenance.
Inheritance
Namespace: Umbraco.Cms.Infrastructure
Assembly: Umbraco.Infrastructure.dll
Syntax
public static class Suspendable.PageCacheRefresher
Properties
View SourceCanRefreshDocumentCacheFromDatabase
Gets a value indicating whether the document cache can currently be refreshed from the database.
Returns true if the cache is not suspended; otherwise, returns false and records that a refresh was attempted while suspended.
Declaration
public static bool CanRefreshDocumentCacheFromDatabase { get; }
Property Value
| Type | Description |
|---|---|
| bool |
CanUpdateDocumentCache
Gets a value indicating whether the document cache can be updated.
Returns true if the cache is not suspended, or if a full update has not yet been attempted.
Declaration
public static bool CanUpdateDocumentCache { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
trying a partial update ok if not suspended, or if we haven't done a full already
Methods
View SourceResumeDocumentCache(CacheRefresherCollection)
Resumes the document cache if it was previously suspended, and refreshes all cached documents using the provided cache refresher collection. If the cache was not suspended, no action is taken.
Declaration
public static void ResumeDocumentCache(CacheRefresherCollection cacheRefresherCollection)
Parameters
| Type | Name | Description |
|---|---|---|
| CacheRefresherCollection | cacheRefresherCollection | The collection of cache refreshers used to refresh the document cache. |
SuspendDocumentCache()
Suspends updates to the document cache, preventing cache refresh operations until resumed. This is typically used during operations where cache consistency must be maintained.
Declaration
public static void SuspendDocumentCache()