Api docs for ResponseCaching (#26531)

* Api docs for ResponseCaching

* Enable warnings for HostFiltering, HttpsPolicy and StaticFiles

* Update src/Middleware/ResponseCaching/src/ResponseCachingFeature.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Add more details

Co-authored-by: Pranav K <prkrishn@hotmail.com>
This commit is contained in:
John Luo 2020-10-02 11:58:34 -07:00 committed by GitHub
parent 659532b16c
commit acf1dc45c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 4 deletions

View File

@ -6,6 +6,7 @@
</Description>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore</PackageTags>
<IsPackable>false</IsPackable>

View File

@ -6,7 +6,7 @@
</Description>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;https;hsts</PackageTags>
<IsPackable>false</IsPackable>

View File

@ -5,6 +5,7 @@
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
<PackageTags>aspnetcore;cache;caching</PackageTags>
<IsPackable>false</IsPackable>
</PropertyGroup>

View File

@ -4,7 +4,7 @@
<Description>ASP.NET Core middleware for caching HTTP responses on the server.</Description>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;cache;caching</PackageTags>

View File

@ -5,10 +5,12 @@ using System;
namespace Microsoft.AspNetCore.ResponseCaching
{
/// Default implementation for <see cref="IResponseCachingFeature" />
public class ResponseCachingFeature : IResponseCachingFeature
{
private string[] _varyByQueryKeys;
/// <inheritdoc />
public string[] VaryByQueryKeys
{
get

View File

@ -1,19 +1,25 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel;
namespace Microsoft.AspNetCore.ResponseCaching
{
/// <summary>
/// Options for configuring the <see cref="ResponseCachingMiddleware"/>.
/// </summary>
public class ResponseCachingOptions
{
/// <summary>
/// The size limit for the response cache middleware in bytes. The default is set to 100 MB.
/// When this limit is exceeded, no new responses will be cached until older entries are
/// evicted.
/// </summary>
public long SizeLimit { get; set; } = 100 * 1024 * 1024;
/// <summary>
/// The largest cacheable size for the response body in bytes. The default is set to 64 MB.
/// If the response body exceeds this limit, it will not be cached by the <see cref="ResponseCachingMiddleware"/>.
/// </summary>
public long MaximumBodySize { get; set; } = 64 * 1024 * 1024;

View File

@ -4,7 +4,7 @@
<Description>ASP.NET Core static files middleware. Includes middleware for serving static files, directory browsing, and default files.</Description>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;staticfiles</PackageTags>
<IsPackable>false</IsPackable>