Search Results for

    Show / Hide Table of Contents
    View Source

    Class DictionaryAppCache

    Implements IAppCache on top of a concurrent dictionary.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Cache
    Assembly: Umbraco.Core.dll
    Syntax
    public class DictionaryAppCache : IRequestCache, IAppCache

    Properties

    View Source

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32
    View Source

    IsAvailable

    Returns true if the request cache is available otherwise false

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

    Methods

    View Source

    Clear()

    Removes all items from the cache.

    Declaration
    public virtual void Clear()
    View Source

    Clear(String)

    Removes an item identified by its key from the cache.

    Declaration
    public virtual void Clear(string key)
    Parameters
    Type Name Description
    System.String key

    The key of the item.

    View Source

    ClearByKey(String)

    Clears items with a key starting with the specified value.

    Declaration
    public virtual void ClearByKey(string keyStartsWith)
    Parameters
    Type Name Description
    System.String keyStartsWith

    The StartsWith value to use in the search.

    View Source

    ClearByRegex(String)

    Clears items with a key matching a regular expression.

    Declaration
    public virtual void ClearByRegex(string regex)
    Parameters
    Type Name Description
    System.String regex

    The regular expression.

    View Source

    ClearOfType(Type)

    Removes items of a specified type from the cache.

    Declaration
    public virtual void ClearOfType(Type type)
    Parameters
    Type Name Description
    Type type

    The type to remove.

    Remarks

    If the type is an interface, then all items of a type implementing that interface are removed. Otherwise, only items of that exact type are removed (items of type inheriting from the specified type are not removed).

    Performs a case-sensitive search.

    View Source

    ClearOfType<T>()

    Removes items of a specified type from the cache.

    Declaration
    public virtual void ClearOfType<T>()
    Type Parameters
    Name Description
    T

    The type of the items to remove.

    Remarks

    If the type is an interface, then all items of a type implementing that interface are removed. Otherwise, only items of that exact type are removed (items of type inheriting from the specified type are not removed).

    View Source

    ClearOfType<T>(Func<String, T, Boolean>)

    Removes items of a specified type from the cache.

    Declaration
    public virtual void ClearOfType<T>(Func<string, T, bool> predicate)
    Parameters
    Type Name Description
    Func<System.String, T, System.Boolean> predicate

    The predicate to satisfy.

    Type Parameters
    Name Description
    T

    The type of the items to remove.

    Remarks

    If the type is an interface, then all items of a type implementing that interface are removed. Otherwise, only items of that exact type are removed (items of type inheriting from the specified type are not removed).

    View Source

    Get(String)

    Gets an item identified by its key.

    Declaration
    public virtual object Get(string key)
    Parameters
    Type Name Description
    System.String key

    The key of the item.

    Returns
    Type Description
    System.Object

    The item, or null if the item was not found.

    View Source

    Get(String, Func<Object>)

    Gets or creates an item identified by its key.

    Declaration
    public virtual object Get(string key, Func<object> factory)
    Parameters
    Type Name Description
    System.String key

    The key of the item.

    Func<System.Object> factory

    A factory function that can create the item.

    Returns
    Type Description
    System.Object

    The item.

    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

    SearchByKey(String)

    Declaration
    public virtual IEnumerable<object> SearchByKey(string keyStartsWith)
    Parameters
    Type Name Description
    System.String keyStartsWith
    Returns
    Type Description
    System.Collections.IEnumerable<System.Object>
    View Source

    SearchByRegex(String)

    Declaration
    public IEnumerable<object> SearchByRegex(string regex)
    Parameters
    Type Name Description
    System.String regex
    Returns
    Type Description
    System.Collections.IEnumerable<System.Object>
    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
    • Properties
      • Count
      • IsAvailable
    • Methods
      • Clear()
      • Clear(String)
      • ClearByKey(String)
      • ClearByRegex(String)
      • ClearOfType(Type)
      • ClearOfType<T>()
      • ClearOfType<T>(Func<String, T, Boolean>)
      • Get(String)
      • Get(String, Func<Object>)
      • GetEnumerator()
      • Remove(String)
      • SearchByKey(String)
      • SearchByRegex(String)
      • Set(String, Object)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX