Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IIdKeyMap

    Provides a mapping between integer IDs, GUIDs (keys), and UDIs for Umbraco entities.

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IIdKeyMap
    Remarks

    This service maintains a cache of ID/key mappings for efficient lookups.

    Methods

    View Source

    ClearCache()

    Clears the entire ID/key mapping cache.

    Declaration
    void ClearCache()
    View Source

    ClearCache(Guid)

    Clears the cache entry for a specific GUID key.

    Declaration
    void ClearCache(Guid key)
    Parameters
    Type Name Description
    Guid key

    The GUID key to remove from the cache.

    View Source

    ClearCache(int)

    Clears the cache entry for a specific integer ID.

    Declaration
    void ClearCache(int id)
    Parameters
    Type Name Description
    int id

    The integer identifier to remove from the cache.

    View Source

    GetIdForKey(Guid, UmbracoObjectTypes)

    Gets the integer ID for a given GUID key and object type.

    Declaration
    Attempt<int> GetIdForKey(Guid key, UmbracoObjectTypes umbracoObjectType)
    Parameters
    Type Name Description
    Guid key

    The unique GUID key of the entity.

    UmbracoObjectTypes umbracoObjectType

    The type of the Umbraco object.

    Returns
    Type Description
    Attempt<int>

    An attempt containing the integer ID if found.

    View Source

    GetIdForUdi(Udi)

    Gets the integer ID for a given UDI.

    Declaration
    Attempt<int> GetIdForUdi(Udi udi)
    Parameters
    Type Name Description
    Udi udi

    The Umbraco Document Identifier.

    Returns
    Type Description
    Attempt<int>

    An attempt containing the integer ID if found.

    View Source

    GetKeyForId(int, UmbracoObjectTypes)

    Gets the GUID key for a given integer ID and object type.

    Declaration
    Attempt<Guid> GetKeyForId(int id, UmbracoObjectTypes umbracoObjectType)
    Parameters
    Type Name Description
    int id

    The integer identifier of the entity.

    UmbracoObjectTypes umbracoObjectType

    The type of the Umbraco object.

    Returns
    Type Description
    Attempt<Guid>

    An attempt containing the GUID key if found.

    View Source

    GetUdiForId(int, UmbracoObjectTypes)

    Gets the UDI for a given integer ID and object type.

    Declaration
    Attempt<Udi?> GetUdiForId(int id, UmbracoObjectTypes umbracoObjectType)
    Parameters
    Type Name Description
    int id

    The integer identifier of the entity.

    UmbracoObjectTypes umbracoObjectType

    The type of the Umbraco object.

    Returns
    Type Description
    Attempt<Udi>

    An attempt containing the UDI if found.

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