Search Results for

    Show / Hide Table of Contents
    View Source

    Class PassThroughCache

    A pass through context cache that always creates the items.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Deploy
    Assembly: Umbraco.Core.dll
    Syntax
    public sealed class PassThroughCache : IContextCache

    Properties

    View Source

    Instance

    Gets the instance.

    Declaration
    public static PassThroughCache Instance { get; }
    Property Value
    Type Description
    PassThroughCache

    The instance.

    Methods

    View Source

    Clear()

    Clears all cached items on this context.

    Declaration
    public void Clear()
    View Source

    Create<T>(String, T)

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

    Declaration
    public 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
    public 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
    • Properties
      • Instance
    • Methods
      • Clear()
      • Create<T>(String, T)
      • GetOrCreate<T>(String, Func<T>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX