Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IRequestCache

    Defines a request-level cache that stores items for the duration of a single HTTP request.

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

    The request cache is designed to store transient data that is only valid within the context of a single HTTP request. Outside a web environment, the behavior of this cache is unspecified.

    Properties

    View Source

    IsAvailable

    Gets a value indicating whether the request cache is available.

    Declaration
    bool IsAvailable { get; }
    Property Value
    Type Description
    bool

    true if the request cache is available; otherwise, false.

    Methods

    View Source

    Remove(string)

    Removes a value from the request cache.

    Declaration
    bool Remove(string key)
    Parameters
    Type Name Description
    string key

    The key of the item to remove.

    Returns
    Type Description
    bool

    true if the item was removed successfully; otherwise, false.

    View Source

    Set(string, object?)

    Sets a value in the request cache.

    Declaration
    bool Set(string key, object? value)
    Parameters
    Type Name Description
    string key

    The key of the item to set.

    object value

    The value to store in the cache.

    Returns
    Type Description
    bool

    true if the value was set successfully; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX