CacheTagHelperBase Class

Definition

TagHelper base implementation for caching elements.

public ref class CacheTagHelperBase abstract : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
public abstract class CacheTagHelperBase : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
type CacheTagHelperBase = class
    inherit TagHelper
Public MustInherit Class CacheTagHelperBase
Inherits TagHelper
Inheritance
CacheTagHelperBase
Derived

Constructors

CacheTagHelperBase(HtmlEncoder)

Creates a new CacheTagHelperBase.

Fields

DefaultExpiration

The default duration, from the time the cache entry was added, when it should be evicted. This default duration will only be used if no other expiration criteria is specified. The default expiration time is a sliding expiration of 30 seconds.

Properties

Enabled

Gets or sets the value which determines if the tag helper is enabled or not.

ExpiresAfter

Gets or sets the duration, from the time the cache entry was added, when it should be evicted.

ExpiresOn

Gets or sets the exact DateTimeOffset the cache entry should be evicted.

ExpiresSliding

Gets or sets the duration from last access that the cache entry should be evicted.

HtmlEncoder

Gets the HtmlEncoder which encodes the content to be cached.

Order

When a set of ITagHelpers are executed, their Init(TagHelperContext)'s are first invoked in the specified Order; then their ProcessAsync(TagHelperContext, TagHelperOutput)'s are invoked in the specified Order. Lower values are executed first.

VaryBy

Gets or sets a String to vary the cached result by.

VaryByCookie

Gets or sets a comma-delimited set of cookie names to vary the cached result by.

VaryByCulture

Gets or sets a value that determines if the cached result is to be varied by request culture.

Setting this to true would result in the result to be varied by CurrentCulture and CurrentUICulture.

VaryByHeader

Gets or sets a comma-delimited set of HTTP request headers to vary the cached result by.

VaryByQuery

Gets or sets a comma-delimited set of query parameters to vary the cached result by.

VaryByRoute

Gets or sets a comma-delimited set of route data parameters to vary the cached result by.

VaryByUser

Gets or sets a value that determines if the cached result is to be varied by the Identity for the logged in User.

ViewContext

Gets or sets the ViewContext for the current executing View.

Methods

Init(TagHelperContext)

Initializes the ITagHelper with the given context. Additions to Items should be done within this method to ensure they're added prior to executing the children.

(Inherited from TagHelper)
Process(TagHelperContext, TagHelperOutput)

Synchronously executes the TagHelper with the given context and output.

(Inherited from TagHelper)
ProcessAsync(TagHelperContext, TagHelperOutput)

Asynchronously executes the TagHelper with the given context and output.

(Inherited from TagHelper)

Applies to