OutputCacheAttribute 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.
Specifies the parameters necessary for setting appropriate headers in output caching.
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class OutputCacheAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type OutputCacheAttribute = class
inherit Attribute
Public NotInheritable Class OutputCacheAttribute
Inherits Attribute
- Inheritance
-
OutputCacheAttribute
- Attributes
Remarks
This attribute requires the output cache middleware.
Constructors
OutputCacheAttribute() |
Properties
Duration |
Gets or sets the duration in seconds for which the response is cached. |
NoStore |
Gets or sets the value which determines whether the response should be cached or not.
When set to |
PolicyName |
Gets or sets the value of the cache policy name. |
Tags |
Gets or sets tags to apply to the output cache. |
VaryByHeaderNames |
Gets or sets the header names to vary by. |
VaryByQueryKeys |
Gets or sets the query keys to vary by. |
VaryByRouteValueNames |
Gets or sets the route value names to vary by. |