DistributedCacheTagHelper Class

Definition

TagHelper implementation targeting <distributed-cache> elements.

public ref class DistributedCacheTagHelper : Microsoft::AspNetCore::Mvc::TagHelpers::CacheTagHelperBase
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("distributed-cache", Attributes="name")]
public class DistributedCacheTagHelper : Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperBase
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("distributed-cache", Attributes="name")>]
type DistributedCacheTagHelper = class
    inherit CacheTagHelperBase
Public Class DistributedCacheTagHelper
Inherits CacheTagHelperBase
Inheritance
DistributedCacheTagHelper
Attributes

Constructors

DistributedCacheTagHelper(IDistributedCacheTagHelperService, HtmlEncoder)

Creates a new CacheTagHelper.

Fields

CacheKeyPrefix

Prefix used by DistributedCacheTagHelper instances when creating entries in IDistributedCacheTagHelperStorage.

Properties

Enabled

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

(Inherited from CacheTagHelperBase)
ExpiresAfter

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

(Inherited from CacheTagHelperBase)
ExpiresOn

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

(Inherited from CacheTagHelperBase)
ExpiresSliding

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

(Inherited from CacheTagHelperBase)
HtmlEncoder

Gets the HtmlEncoder which encodes the content to be cached.

(Inherited from CacheTagHelperBase)
MemoryCache

Gets the IMemoryCache instance used to cache workers.

Name

Gets or sets a unique name to discriminate cached entries.

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.

(Inherited from CacheTagHelperBase)
VaryBy

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

(Inherited from CacheTagHelperBase)
VaryByCookie

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

(Inherited from CacheTagHelperBase)
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.

(Inherited from CacheTagHelperBase)
VaryByHeader

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

(Inherited from CacheTagHelperBase)
VaryByQuery

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

(Inherited from CacheTagHelperBase)
VaryByRoute

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

(Inherited from CacheTagHelperBase)
VaryByUser

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

(Inherited from CacheTagHelperBase)
ViewContext

Gets or sets the ViewContext for the current executing View.

(Inherited from CacheTagHelperBase)

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.

Applies to