CacheTagHelper Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
TagHelper implementation targeting <cache> elements.
public ref class CacheTagHelper : Microsoft::AspNetCore::Mvc::TagHelpers::CacheTagHelperBase
public class CacheTagHelper : Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperBase
type CacheTagHelper = class
inherit CacheTagHelperBase
Public Class CacheTagHelper
Inherits CacheTagHelperBase
- Inheritance
Constructors
Fields
CacheKeyPrefix |
Prefix used by CacheTagHelper instances when creating entries in MemoryCache. |
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 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) |
Priority |
Gets or sets the CacheItemPriority policy for the cache entry. |
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 |
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 |
Process(TagHelperContext, TagHelperOutput) |
Synchronously executes the TagHelper with the given |
ProcessAsync(TagHelperContext, TagHelperOutput) |
Asynchronously executes the TagHelper with the given |