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 SourceGetDuration(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 |