Search Results for

    Show / Hide Table of Contents
    View Source

    Class CacheSyncService

    Inheritance
    object
    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Core.dll
    Syntax
    public class CacheSyncService : ICacheSyncService

    Constructors

    View Source

    CacheSyncService(IMachineInfoFactory, CacheRefresherCollection, ICacheInstructionService)

    Declaration
    public CacheSyncService(IMachineInfoFactory machineInfoFactory, CacheRefresherCollection cacheRefreshers, ICacheInstructionService cacheInstructionService)
    Parameters
    Type Name Description
    IMachineInfoFactory machineInfoFactory
    CacheRefresherCollection cacheRefreshers
    ICacheInstructionService cacheInstructionService

    Methods

    View Source

    SyncAll(CancellationToken)

    Synchronizes all caches including both isolated caches and published content caches.

    Declaration
    public void SyncAll(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Remarks

    This method clears all isolated caches (repositories and services) and published content caches (IPublishedContentCache, route caching, etc.) to ensure complete cache consistency across the cluster.

    View Source

    SyncInternal(CancellationToken)

    Synchronizes only isolated caches without affecting the published content cache layer.

    Declaration
    public void SyncInternal(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Remarks

    This method clears only the isolated caches used by repositories and services, leaving the published content cache layer intact. During synchronization, repositories reload data from the database while temporarily bypassing version checking to prevent recursive sync attempts.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX