Net Core 2.2 has a support to execute [health checks](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-2.2) for published services.
I would like to cache a response of checking.

I see that I can use the [HealthCheckOptions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.diagnostics.healthchecks.healthcheckoptions?view=aspnetcore-2.2) and set `true` value for the [AllowCachingResponses](https://learn.microsoft.com/ru-ru/dotnet/api/microsoft.aspnetcore.diagnostics.healthchecks.healthcheckoptions.allowcachingresponses?view=aspnetcore-2.2) property.

```
app.UseHealthChecks("/api/services/healthCheck",
    new Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions()
    {
        AllowCachingResponses = true
    });

```

But I don't understand how I can set the amount time caching. What is the best place to set corresponding HTTP headers(`Cache-Control`, `Expires`, etc.) and how?

My service is published by IIS.