Search Results for

    Show / Hide Table of Contents
    View Source

    Class AppCaches

    Represents the application caches.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Cache
    Assembly: Umbraco.Core.dll
    Syntax
    public class AppCaches : IDisposable

    Constructors

    View Source

    AppCaches(IAppPolicyCache, IRequestCache, IsolatedCaches)

    Initializes a new instance of the AppCaches with cache providers.

    Declaration
    public AppCaches(IAppPolicyCache runtimeCache, IRequestCache requestCache, IsolatedCaches isolatedCaches)
    Parameters
    Type Name Description
    IAppPolicyCache runtimeCache
    IRequestCache requestCache
    IsolatedCaches isolatedCaches

    Properties

    View Source

    Disabled

    Gets the special disabled instance.

    Declaration
    public static AppCaches Disabled { get; }
    Property Value
    Type Description
    AppCaches
    Remarks

    When used by repositories, all cache policies apply, but the underlying caches do not cache anything.

    Used by tests.

    View Source

    IsolatedCaches

    Gets the isolated caches.

    Declaration
    public IsolatedCaches IsolatedCaches { get; }
    Property Value
    Type Description
    IsolatedCaches
    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.

    View Source

    NoCache

    Gets the special no-cache instance.

    Declaration
    public static AppCaches NoCache { get; }
    Property Value
    Type Description
    AppCaches
    Remarks

    When used by repositories, all cache policies are bypassed.

    Used by repositories that do no cache.

    View Source

    RequestCache

    Gets the per-request cache.

    Declaration
    public IRequestCache RequestCache { get; }
    Property Value
    Type Description
    IRequestCache
    Remarks

    The per-request caches works on top of the current HttpContext items.

    Outside a web environment, the behavior of that cache is unspecified.

    View Source

    RuntimeCache

    Gets the runtime cache.

    Declaration
    public IAppPolicyCache RuntimeCache { get; }
    Property Value
    Type Description
    IAppPolicyCache
    Remarks

    The runtime cache is the main application cache.

    Methods

    View Source

    Create(IRequestCache)

    Declaration
    public static AppCaches Create(IRequestCache requestCache)
    Parameters
    Type Name Description
    IRequestCache requestCache
    Returns
    Type Description
    AppCaches
    View Source

    Dispose()

    Declaration
    public void Dispose()
    View Source

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • AppCaches(IAppPolicyCache, IRequestCache, IsolatedCaches)
    • Properties
      • Disabled
      • IsolatedCaches
      • NoCache
      • RequestCache
      • RuntimeCache
    • Methods
      • Create(IRequestCache)
      • Dispose()
      • Dispose(Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX