Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContextCache

    Represents a context cache used by Deploy operations.

    Namespace: Umbraco.Cms.Core.Deploy
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IContextCache

    Methods

    View Source

    Clear()

    Clears all cached items on this context.

    Declaration
    void Clear()
    View Source

    Create<T>(String, T)

    Creates the item on the context cache using the specified key.

    Declaration
    void Create<T>(string key, T item)
    Parameters
    Type Name Description
    System.String key

    The key of the cached item.

    T item

    The item.

    Type Parameters
    Name Description
    T

    The type of the cached item.

    View Source

    GetOrCreate<T>(String, Func<T>)

    Gets an item from the context cache or creates and stores it using the specified key.

    Declaration
    T GetOrCreate<T>(string key, Func<T> factory)
    Parameters
    Type Name Description
    System.String key

    The key of the cached item.

    Func<T> factory

    The factory method to create the item (if it doesn't exist yet).

    Returns
    Type Description
    T

    The item.

    Type Parameters
    Name Description
    T

    The type of the cached item.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • Clear()
      • Create<T>(String, T)
      • GetOrCreate<T>(String, Func<T>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX