KestrunHttpMiddlewareExtensions.AddResponseCaching method (1 of 2)
Adds response caching to the application. This overload allows you to specify a configuration delegate.
public static KestrunHost AddResponseCaching(this KestrunHost host,
Action<ResponseCachingOptions>? cfg = null, CacheControlHeaderValue? cacheControl = null)
| parameter | description |
|---|---|
| host | The KestrunHost instance to configure. |
| cfg | Optional configuration for response caching. |
| cacheControl | Optional default Cache-Control to apply (only if the response didn’t set one). |
Return Value
The updated KestrunHost instance.
See Also
- class KestrunHost
- class KestrunHttpMiddlewareExtensions
- namespace Kestrun.Hosting
KestrunHttpMiddlewareExtensions.AddResponseCaching method (2 of 2)
Adds response caching to the application. This overload allows you to specify configuration options.
public static KestrunHost AddResponseCaching(this KestrunHost host, ResponseCachingOptions options,
CacheControlHeaderValue? cacheControl = null)
| parameter | description |
|---|---|
| host | The KestrunHost instance to configure. |
| options | The configuration options for response caching. |
| cacheControl | Optional default Cache-Control to apply (only if the response didn’t set one). |
See Also
- class KestrunHost
- class KestrunHttpMiddlewareExtensions
- namespace Kestrun.Hosting