Interface IPublishedSnapshotService
Creates and manages IPublishedSnapshot instances.
Namespace: Umbraco.Cms.Core.PublishedCache
Assembly: Umbraco.Core.dll
Syntax
public interface IPublishedSnapshotService
Methods
View SourceCollectAsync()
Cleans up unused snapshots
Declaration
Task CollectAsync()
Returns
Type | Description |
---|---|
Task |
CreatePublishedSnapshot(String)
Creates a published snapshot.
Declaration
IPublishedSnapshot CreatePublishedSnapshot(string previewToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | previewToken | A preview token, or |
Returns
Type | Description |
---|---|
IPublishedSnapshot | A published snapshot. |
Remarks
If previewToken
is null, the snapshot is not previewing, else it
is previewing, and what is or is not visible in preview depends on the content of the token,
which is not specified and depends on the actual published snapshot service implementation.
Notify(ContentCacheRefresher.JsonPayload[], out Boolean, out Boolean)
Notifies of content cache refresher changes.
Declaration
void Notify(ContentCacheRefresher.JsonPayload[] payloads, out bool draftChanged, out bool publishedChanged)
Parameters
Type | Name | Description |
---|---|---|
ContentCacheRefresher.JsonPayload[] | payloads | The changes. |
System.Boolean | draftChanged | A value indicating whether draft contents have been changed in the cache. |
System.Boolean | publishedChanged | A value indicating whether published contents have been changed in the cache. |
Notify(ContentTypeCacheRefresher.JsonPayload[])
Notifies of content type refresher changes.
Declaration
void Notify(ContentTypeCacheRefresher.JsonPayload[] payloads)
Parameters
Type | Name | Description |
---|---|---|
ContentTypeCacheRefresher.JsonPayload[] | payloads | The changes. |
Notify(DataTypeCacheRefresher.JsonPayload[])
Notifies of data type refresher changes.
Declaration
void Notify(DataTypeCacheRefresher.JsonPayload[] payloads)
Parameters
Type | Name | Description |
---|---|---|
DataTypeCacheRefresher.JsonPayload[] | payloads | The changes. |
Notify(DomainCacheRefresher.JsonPayload[])
Notifies of domain refresher changes.
Declaration
void Notify(DomainCacheRefresher.JsonPayload[] payloads)
Parameters
Type | Name | Description |
---|---|---|
DomainCacheRefresher.JsonPayload[] | payloads | The changes. |
Notify(MediaCacheRefresher.JsonPayload[], out Boolean)
Notifies of media cache refresher changes.
Declaration
void Notify(MediaCacheRefresher.JsonPayload[] payloads, out bool anythingChanged)
Parameters
Type | Name | Description |
---|---|---|
MediaCacheRefresher.JsonPayload[] | payloads | The changes. |
System.Boolean | anythingChanged | A value indicating whether medias have been changed in the cache. |
Rebuild(Nullable<IReadOnlyCollection<Int32>>, Nullable<IReadOnlyCollection<Int32>>, Nullable<IReadOnlyCollection<Int32>>)
Rebuilds internal database caches (but does not reload).
Declaration
void Rebuild(IReadOnlyCollection<int>? contentTypeIds = null, IReadOnlyCollection<int>? mediaTypeIds = null, IReadOnlyCollection<int>? memberTypeIds = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<IReadOnlyCollection<System.Int32>> | contentTypeIds | If not null will process content for the matching content types, if empty will process all content |
System.Nullable<IReadOnlyCollection<System.Int32>> | mediaTypeIds | If not null will process content for the matching media types, if empty will process all media |
System.Nullable<IReadOnlyCollection<System.Int32>> | memberTypeIds | If not null will process content for the matching members types, if empty will process all members |
Remarks
Forces the snapshot service to rebuild its internal database caches. For instance, some caches may rely on a database table to store pre-serialized version of documents.
This does not reload the caches. Caches need to be reloaded, for instance via DistributedCache RefreshAllPublishedSnapshot method.
RebuildAll()
Rebuilds all internal database caches (but does not reload).
Declaration
virtual void RebuildAll()
Remarks
Forces the snapshot service to rebuild its internal database caches. For instance, some caches may rely on a database table to store pre-serialized version of documents.
This does not reload the caches. Caches need to be reloaded, for instance via DistributedCache RefreshAllPublishedSnapshot method.