Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IWebsiteOutputCacheDurationProvider

    Provides custom cache durations per content item for website output caching.

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

    A single registration of this interface is expected. The default implementation can be replaced to vary duration by content type, path, or content properties.

    Methods

    View Source

    GetDuration(IPublishedContent)

    Returns a custom cache duration for the given content, or null to use the configured default.

    Declaration
    TimeSpan? GetDuration(IPublishedContent content)
    Parameters
    Type Name Description
    IPublishedContent content

    The published content being cached.

    Returns
    Type Description
    TimeSpan?

    A custom cache duration, System.TimeSpan.Zero to disable caching for this content, or null to use the configured default duration.

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