

CacheProfileName string When set, determines the name of the cache profile to use. VaryByHeader string When set, a vary response header will be written with the response. When true, Duration is ignored and Location is ignored for values other than None. NoStore bool Determines whether the value should be stored or not, and overrides other property values. Location ResponseCacheLocation The location where the response may be cached. Duration int The maximum duration (in seconds) the response should be cached. The attribute has the following properties, all of which are optional unless otherwise noted. The ResponseCacheAttribute is used to specify how a controller action’s headers should be set to control its cache behavior. no-cache Indicates the response must not be used by a cache to satisfy any subsequent request (without successful revalidation with the origin server). The response could still be cached in a private cache (for instance, by the user’s browser). private Indicates the response is intended for a single user and must not be cached by a shared cache. Three common directives are: public Indicates that the response may be cached. The HTTP 1.1 specification details many options for this directive. The primary HTTP header used for caching is Cache-Control. In this case, the request is never made to the web server. This can reduce the number of requests a client or proxy makes to the web server, since future requests for the same action may be served from the client or proxy’s cache. These headers specify how you want client and intermediate (proxy) machines to cache responses to certain requests (if at all). Response caching refers to specifying cache-related headers on HTTP responses made by ASP.NET Core MVC actions.
