Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IAppPolicyCache

    Defines an application cache that support cache policies.

    Namespace: Umbraco.Cms.Core.Cache
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IAppPolicyCache : IAppCache
    Remarks

    A cache policy can be used to cache with timeouts, or depending on files, and with a remove callback, etc.

    Methods

    View Source

    Get(String, Func<Object>, Nullable<TimeSpan>, Boolean, String[])

    Gets an item identified by its key.

    Declaration
    object Get(string key, Func<object> factory, TimeSpan? timeout, bool isSliding = false, string[] dependentFiles = null)
    Parameters
    Type Name Description
    System.String key

    The key of the item.

    Func<System.Object> factory

    A factory function that can create the item.

    System.Nullable<TimeSpan> timeout

    An optional cache timeout.

    System.Boolean isSliding

    An optional value indicating whether the cache timeout is sliding (default is false).

    System.String[] dependentFiles

    Files the cache entry depends on.

    Returns
    Type Description
    System.Object

    The item.

    View Source

    Insert(String, Func<Object>, Nullable<TimeSpan>, Boolean, String[])

    Inserts an item.

    Declaration
    void Insert(string key, Func<object> factory, TimeSpan? timeout = null, bool isSliding = false, string[] dependentFiles = null)
    Parameters
    Type Name Description
    System.String key

    The key of the item.

    Func<System.Object> factory

    A factory function that can create the item.

    System.Nullable<TimeSpan> timeout

    An optional cache timeout.

    System.Boolean isSliding

    An optional value indicating whether the cache timeout is sliding (default is false).

    System.String[] dependentFiles

    Files the cache entry depends on.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • Get(String, Func<Object>, Nullable<TimeSpan>, Boolean, String[])
      • Insert(String, Func<Object>, Nullable<TimeSpan>, Boolean, String[])
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX