Search Results for

    Show / Hide Table of Contents
    View Source

    Class IsolatedCaches

    Represents a dictionary of IAppPolicyCache for types.

    Inheritance
    System.Object
    AppPolicedCacheDictionary<Type>
    Namespace: Umbraco.Cms.Core.Cache
    Assembly: Umbraco.Core.dll
    Syntax
    public class IsolatedCaches : AppPolicedCacheDictionary<Type>
    Remarks

    Isolated caches are used by e.g. repositories, to ensure that each cached entity type has its own cache, so that lookups are fast and the repository does not need to search through all keys on a global scale.

    Constructors

    View Source

    IsolatedCaches(Func<Type, IAppPolicyCache>)

    Initializes a new instance of the IsolatedCaches class.

    Declaration
    public IsolatedCaches(Func<Type, IAppPolicyCache> cacheFactory)
    Parameters
    Type Name Description
    Func<Type, IAppPolicyCache> cacheFactory

    Methods

    View Source

    ClearCache<T>()

    Clears a cache.

    Declaration
    public void ClearCache<T>()
    Type Parameters
    Name Description
    T
    View Source

    Get<T>()

    Tries to get a cache.

    Declaration
    public Attempt<IAppPolicyCache> Get<T>()
    Returns
    Type Description
    Attempt<IAppPolicyCache>
    Type Parameters
    Name Description
    T
    View Source

    GetOrCreate<T>()

    Gets a cache.

    Declaration
    public IAppPolicyCache GetOrCreate<T>()
    Returns
    Type Description
    IAppPolicyCache
    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX