Search Results for

    Show / Hide Table of Contents
    View Source

    Class DistributedCacheExtensions

    Extension methods for DistributedCache.

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class DistributedCacheExtensions

    Methods

    View Source

    RefreshAllContentCache(DistributedCache)

    Refreshes all content in the distributed cache.

    Declaration
    public static void RefreshAllContentCache(this DistributedCache dc)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    View Source

    RefreshAllDomainCache(DistributedCache)

    Refreshes all domains in the distributed cache.

    Declaration
    public static void RefreshAllDomainCache(this DistributedCache dc)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    View Source

    RefreshAllMediaCache(DistributedCache)

    Refreshes all media in the distributed cache.

    Declaration
    public static void RefreshAllMediaCache(this DistributedCache dc)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    View Source

    RefreshAllPublishedSnapshot(DistributedCache)

    Refreshes all published snapshots including content, media, and domain caches.

    Declaration
    public static void RefreshAllPublishedSnapshot(this DistributedCache dc)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    View Source

    RefreshAllUserCache(DistributedCache)

    Refreshes all users in the distributed cache.

    Declaration
    public static void RefreshAllUserCache(this DistributedCache dc)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    View Source

    RefreshAllUserGroupCache(DistributedCache)

    Refreshes all user groups in the distributed cache.

    Declaration
    public static void RefreshAllUserGroupCache(this DistributedCache dc)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    View Source

    RefreshContentCache(DistributedCache, IEnumerable<TreeChange<IContent>>)

    Refreshes the content cache for the specified content changes.

    Declaration
    public static void RefreshContentCache(this DistributedCache dc, IEnumerable<TreeChange<IContent>> changes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<TreeChange<IContent>> changes

    The content changes to refresh.

    View Source

    RefreshContentTypeCache(DistributedCache, IEnumerable<ContentTypeChange<IContentType>>)

    Refreshes the content type cache for the specified content type changes.

    Declaration
    public static void RefreshContentTypeCache(this DistributedCache dc, IEnumerable<ContentTypeChange<IContentType>> changes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<ContentTypeChange<IContentType>> changes

    The content type changes to refresh.

    View Source

    RefreshContentTypeCache(DistributedCache, IEnumerable<ContentTypeChange<IMediaType>>)

    Refreshes the content type cache for the specified media type changes.

    Declaration
    public static void RefreshContentTypeCache(this DistributedCache dc, IEnumerable<ContentTypeChange<IMediaType>> changes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<ContentTypeChange<IMediaType>> changes

    The media type changes to refresh.

    View Source

    RefreshContentTypeCache(DistributedCache, IEnumerable<ContentTypeChange<IMemberType>>)

    Refreshes the content type cache for the specified member type changes.

    Declaration
    public static void RefreshContentTypeCache(this DistributedCache dc, IEnumerable<ContentTypeChange<IMemberType>> changes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<ContentTypeChange<IMemberType>> changes

    The member type changes to refresh.

    View Source

    RefreshDataTypeCache(DistributedCache, IEnumerable<IDataType>)

    Refreshes the specified data types in the distributed cache.

    Declaration
    public static void RefreshDataTypeCache(this DistributedCache dc, IEnumerable<IDataType> dataTypes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IDataType> dataTypes

    The data types to refresh in cache.

    View Source

    RefreshDictionaryCache(DistributedCache, IEnumerable<IDictionaryItem>)

    Refreshes the specified dictionary items in the distributed cache.

    Declaration
    public static void RefreshDictionaryCache(this DistributedCache dc, IEnumerable<IDictionaryItem> dictionaryItems)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IDictionaryItem> dictionaryItems

    The dictionary items to refresh in cache.

    View Source

    RefreshDictionaryCache(DistributedCache, int)

    Refreshes a dictionary item in the distributed cache.

    Declaration
    public static void RefreshDictionaryCache(this DistributedCache dc, int dictionaryItemId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int dictionaryItemId

    The dictionary item identifier.

    View Source

    RefreshDomainCache(DistributedCache, IEnumerable<IDomain>)

    Refreshes the specified domains in the distributed cache.

    Declaration
    public static void RefreshDomainCache(this DistributedCache dc, IEnumerable<IDomain> domains)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IDomain> domains

    The domains to refresh in cache.

    View Source

    RefreshLanguageCache(DistributedCache, IEnumerable<ILanguage>)

    Refreshes the specified languages in the distributed cache.

    Declaration
    public static void RefreshLanguageCache(this DistributedCache dc, IEnumerable<ILanguage> languages)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<ILanguage> languages

    The languages to refresh in cache.

    View Source

    RefreshMediaCache(DistributedCache, IEnumerable<TreeChange<IMedia>>)

    Refreshes the media cache for the specified media changes.

    Declaration
    public static void RefreshMediaCache(this DistributedCache dc, IEnumerable<TreeChange<IMedia>> changes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<TreeChange<IMedia>> changes

    The media changes to refresh.

    View Source

    RefreshMemberCache(DistributedCache, IEnumerable<IMember>)

    Refreshes the specified members in the distributed cache.

    Declaration
    [Obsolete("Please use the overload taking all parameters. Scheduled for removal in Umbraco 18.")]
    public static void RefreshMemberCache(this DistributedCache dc, IEnumerable<IMember> members)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IMember> members

    The members to refresh in cache.

    View Source

    RefreshMemberCache(DistributedCache, IEnumerable<IMember>, IDictionary<string, object?>)

    Refreshes the specified members in the distributed cache.

    Declaration
    public static void RefreshMemberCache(this DistributedCache dc, IEnumerable<IMember> members, IDictionary<string, object?> state)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IMember> members

    The members to refresh in cache.

    IDictionary<string, object> state

    The notification state.

    View Source

    RefreshMemberGroupCache(DistributedCache, IEnumerable<IMemberGroup>)

    Refreshes the specified member groups in the distributed cache.

    Declaration
    public static void RefreshMemberGroupCache(this DistributedCache dc, IEnumerable<IMemberGroup> memberGroups)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IMemberGroup> memberGroups

    The member groups to refresh in cache.

    View Source

    RefreshMemberGroupCache(DistributedCache, int)

    Refreshes a member group in the distributed cache.

    Declaration
    public static void RefreshMemberGroupCache(this DistributedCache dc, int memberGroupId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int memberGroupId

    The member group identifier.

    View Source

    RefreshPublicAccess(DistributedCache)

    Refreshes all public access entries in the distributed cache.

    Declaration
    public static void RefreshPublicAccess(this DistributedCache dc)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    View Source

    RefreshRelationTypeCache(DistributedCache, IEnumerable<IRelationType>)

    Refreshes the specified relation types in the distributed cache.

    Declaration
    public static void RefreshRelationTypeCache(this DistributedCache dc, IEnumerable<IRelationType> relationTypes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IRelationType> relationTypes

    The relation types to refresh in cache.

    View Source

    RefreshRelationTypeCache(DistributedCache, int)

    Refreshes a relation type in the distributed cache.

    Declaration
    public static void RefreshRelationTypeCache(this DistributedCache dc, int id)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int id

    The relation type identifier.

    View Source

    RefreshTemplateCache(DistributedCache, IEnumerable<ITemplate>)

    Refreshes the specified templates in the distributed cache.

    Declaration
    public static void RefreshTemplateCache(this DistributedCache dc, IEnumerable<ITemplate> templates)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<ITemplate> templates

    The templates to refresh in cache.

    View Source

    RefreshTemplateCache(DistributedCache, int)

    Refreshes a template in the distributed cache.

    Declaration
    public static void RefreshTemplateCache(this DistributedCache dc, int templateId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int templateId

    The template identifier.

    View Source

    RefreshUserCache(DistributedCache, IEnumerable<IUser>)

    Refreshes the specified users in the distributed cache.

    Declaration
    public static void RefreshUserCache(this DistributedCache dc, IEnumerable<IUser> users)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IUser> users

    The users to refresh in cache.

    View Source

    RefreshUserGroupCache(DistributedCache, IEnumerable<IUserGroup>)

    Refreshes the specified user groups in the distributed cache.

    Declaration
    public static void RefreshUserGroupCache(this DistributedCache dc, IEnumerable<IUserGroup> userGroups)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IUserGroup> userGroups

    The user groups to refresh in cache.

    View Source

    RefreshUserGroupCache(DistributedCache, int)

    Refreshes a user group in the distributed cache by user identifier.

    Declaration
    public static void RefreshUserGroupCache(this DistributedCache dc, int userId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int userId

    The user identifier.

    View Source

    RefreshValueEditorCache(DistributedCache, IEnumerable<IDataType>)

    Refreshes the value editor cache for the specified data types.

    Declaration
    public static void RefreshValueEditorCache(this DistributedCache dc, IEnumerable<IDataType> dataTypes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IDataType> dataTypes

    The data types whose value editors should be refreshed.

    View Source

    RemoveDataTypeCache(DistributedCache, IEnumerable<IDataType>)

    Removes the specified data types from the distributed cache.

    Declaration
    public static void RemoveDataTypeCache(this DistributedCache dc, IEnumerable<IDataType> dataTypes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IDataType> dataTypes

    The data types to remove from cache.

    View Source

    RemoveDictionaryCache(DistributedCache, IEnumerable<IDictionaryItem>)

    Removes the specified dictionary items from the distributed cache.

    Declaration
    public static void RemoveDictionaryCache(this DistributedCache dc, IEnumerable<IDictionaryItem> dictionaryItems)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IDictionaryItem> dictionaryItems

    The dictionary items to remove from cache.

    View Source

    RemoveDictionaryCache(DistributedCache, int)

    Removes a dictionary item from the distributed cache.

    Declaration
    public static void RemoveDictionaryCache(this DistributedCache dc, int dictionaryItemId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int dictionaryItemId

    The dictionary item identifier.

    View Source

    RemoveDomainCache(DistributedCache, IEnumerable<IDomain>)

    Removes the specified domains from the distributed cache.

    Declaration
    public static void RemoveDomainCache(this DistributedCache dc, IEnumerable<IDomain> domains)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IDomain> domains

    The domains to remove from cache.

    View Source

    RemoveLanguageCache(DistributedCache, IEnumerable<ILanguage>)

    Removes the specified languages from the distributed cache.

    Declaration
    public static void RemoveLanguageCache(this DistributedCache dc, IEnumerable<ILanguage> languages)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<ILanguage> languages

    The languages to remove from cache.

    View Source

    RemoveMemberCache(DistributedCache, IEnumerable<IMember>)

    Removes the specified members from the distributed cache.

    Declaration
    [Obsolete("Please use the overload taking all parameters. Scheduled for removal in Umbraco 18.")]
    public static void RemoveMemberCache(this DistributedCache dc, IEnumerable<IMember> members)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IMember> members

    The members to remove from cache.

    View Source

    RemoveMemberCache(DistributedCache, IEnumerable<IMember>, IDictionary<string, object?>)

    Removes the specified members from the distributed cache.

    Declaration
    public static void RemoveMemberCache(this DistributedCache dc, IEnumerable<IMember> members, IDictionary<string, object?> state)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IMember> members

    The members to remove from cache.

    IDictionary<string, object> state

    The notification state.

    View Source

    RemoveMemberGroupCache(DistributedCache, IEnumerable<IMemberGroup>)

    Removes the specified member groups from the distributed cache.

    Declaration
    public static void RemoveMemberGroupCache(this DistributedCache dc, IEnumerable<IMemberGroup> memberGroups)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IMemberGroup> memberGroups

    The member groups to remove from cache.

    View Source

    RemoveMemberGroupCache(DistributedCache, int)

    Removes a member group from the distributed cache.

    Declaration
    public static void RemoveMemberGroupCache(this DistributedCache dc, int memberGroupId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int memberGroupId

    The member group identifier.

    View Source

    RemoveRelationTypeCache(DistributedCache, IEnumerable<IRelationType>)

    Removes the specified relation types from the distributed cache.

    Declaration
    public static void RemoveRelationTypeCache(this DistributedCache dc, IEnumerable<IRelationType> relationTypes)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IRelationType> relationTypes

    The relation types to remove from cache.

    View Source

    RemoveRelationTypeCache(DistributedCache, int)

    Removes a relation type from the distributed cache.

    Declaration
    public static void RemoveRelationTypeCache(this DistributedCache dc, int id)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int id

    The relation type identifier.

    View Source

    RemoveTemplateCache(DistributedCache, IEnumerable<ITemplate>)

    Removes the specified templates from the distributed cache.

    Declaration
    public static void RemoveTemplateCache(this DistributedCache dc, IEnumerable<ITemplate> templates)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<ITemplate> templates

    The templates to remove from cache.

    View Source

    RemoveTemplateCache(DistributedCache, int)

    Removes a template from the distributed cache.

    Declaration
    public static void RemoveTemplateCache(this DistributedCache dc, int templateId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int templateId

    The template identifier.

    View Source

    RemoveUserCache(DistributedCache, IEnumerable<IUser>)

    Removes the specified users from the distributed cache.

    Declaration
    public static void RemoveUserCache(this DistributedCache dc, IEnumerable<IUser> users)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IUser> users

    The users to remove from cache.

    View Source

    RemoveUserGroupCache(DistributedCache, IEnumerable<IUserGroup>)

    Removes the specified user groups from the distributed cache.

    Declaration
    public static void RemoveUserGroupCache(this DistributedCache dc, IEnumerable<IUserGroup> userGroups)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    IEnumerable<IUserGroup> userGroups

    The user groups to remove from cache.

    View Source

    RemoveUserGroupCache(DistributedCache, int)

    Removes a user group from the distributed cache by user identifier.

    Declaration
    public static void RemoveUserGroupCache(this DistributedCache dc, int userId)
    Parameters
    Type Name Description
    DistributedCache dc

    The distributed cache.

    int userId

    The user identifier.

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