Table of Contents

UseCacheControl Method

Definition

UseCacheControl(IApplicationBuilder, Action<CacheableOptions>)

Adds an HTTP Cache-Control and HTTP Expires header to the IApplicationBuilder request execution pipeline.

public static IApplicationBuilder UseCacheControl(this IApplicationBuilder builder, Action<CacheableOptions> setup = null)

Parameters

builder IApplicationBuilder

The type that provides the mechanisms to configure an application’s request pipeline.

setup Action<CacheableOptions>

The CacheableOptions middleware which may be configured.

Returns

IApplicationBuilder

An IApplicationBuilder that can be used to further configure the request pipeline.