NoCacheApplicationBuilderExtensions Class
Extension methods to register NoCacheMiddleware.
public static class NoCacheApplicationBuilderExtensionsMethods
| Name | Description |
|---|---|
| UseNoCache(IApplicationBuilder) | Adds a middleware that sets a default non-cacheable Cache-Control response header when the response does not define one. |
UseNoCache(IApplicationBuilder)
NoCacheApplicationBuilderExtensions.csAdds a middleware that sets a default non-cacheable Cache-Control response header when the response does not define one.
public static IApplicationBuilder UseNoCache(this IApplicationBuilder app)Parameters
appIApplicationBuilder- The application builder.
Returns
IApplicationBuilder The application builder, to allow chaining.
Remarks
Register this after any component that serves cacheable content, such as UseStaticFiles. See NoCacheMiddleware for the caching implications of the default value.