Search Results for

    Show / Hide Table of Contents
    View Source

    Class HttpContextRequestAppCache

    Implements a on top of Microsoft.AspNetCore.Http.IHttpContextAccessor

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Cache
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public class HttpContextRequestAppCache : FastDictionaryAppCacheBase
    Remarks

    The HttpContext is not thread safe and no part of it is which means we need to include our own thread safety mechanisms. This relies on notifications: and in order to facilitate the correct locking and releasing allocations.

    Constructors

    View Source

    HttpContextRequestAppCache(IHttpContextAccessor)

    Initializes a new instance of the HttpContextRequestAppCache class with a context, for unit tests!

    Declaration
    public HttpContextRequestAppCache(IHttpContextAccessor httpContextAccessor)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor

    Properties

    View Source

    IsAvailable

    Declaration
    public bool IsAvailable { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    View Source

    EnterReadLock()

    Declaration
    protected override void EnterReadLock()
    View Source

    EnterWriteLock()

    Declaration
    protected override void EnterWriteLock()
    View Source

    ExitReadLock()

    Declaration
    protected override void ExitReadLock()
    View Source

    ExitWriteLock()

    Declaration
    protected override void ExitWriteLock()
    View Source

    Get(String, Func<Object>)

    Declaration
    public override object Get(string key, Func<object> factory)
    Parameters
    Type Name Description
    System.String key
    Func<System.Object> factory
    Returns
    Type Description
    System.Object
    View Source

    GetDictionaryEntries()

    Declaration
    protected override IEnumerable<KeyValuePair<object, object>> GetDictionaryEntries()
    Returns
    Type Description
    System.Collections.IEnumerable<KeyValuePair<System.Object, System.Object>>
    View Source

    GetEntry(String)

    Declaration
    protected override object GetEntry(string key)
    Parameters
    Type Name Description
    System.String key
    Returns
    Type Description
    System.Object
    View Source

    GetEnumerator()

    Declaration
    public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator<KeyValuePair<System.String, System.Object>>
    View Source

    Remove(String)

    Declaration
    public bool Remove(string key)
    Parameters
    Type Name Description
    System.String key
    Returns
    Type Description
    System.Boolean
    View Source

    RemoveEntry(String)

    Declaration
    protected override void RemoveEntry(string key)
    Parameters
    Type Name Description
    System.String key
    View Source

    Set(String, Object)

    Declaration
    public bool Set(string key, object value)
    Parameters
    Type Name Description
    System.String key
    System.Object value
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • HttpContextRequestAppCache(IHttpContextAccessor)
    • Properties
      • IsAvailable
    • Methods
      • EnterReadLock()
      • EnterWriteLock()
      • ExitReadLock()
      • ExitWriteLock()
      • Get(String, Func<Object>)
      • GetDictionaryEntries()
      • GetEntry(String)
      • GetEnumerator()
      • Remove(String)
      • RemoveEntry(String)
      • Set(String, Object)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX