Add XML Documentation to ResponseCachingMiddleware and ResponseCachingExtensions (#18968)
* Add XML Documentation to ResponseCachingMiddleware and ResponseCachingExtensions * Update src/Middleware/ResponseCaching/src/ResponseCachingExtensions.cs Co-Authored-By: Andrew Stanton-Nurse <andrew@stanton-nurse.com> * Update src/Middleware/ResponseCaching/src/ResponseCachingExtensions.cs Co-Authored-By: Andrew Stanton-Nurse <andrew@stanton-nurse.com> * Update src/Middleware/ResponseCaching/src/ResponseCachingExtensions.cs Co-Authored-By: Andrew Stanton-Nurse <andrew@stanton-nurse.com> * Update src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs Co-Authored-By: Andrew Stanton-Nurse <andrew@stanton-nurse.com> * Update src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs Co-Authored-By: Andrew Stanton-Nurse <andrew@stanton-nurse.com> * Update ResponseCachingMiddleware.cs Co-authored-by: Andrew Stanton-Nurse <andrew@stanton-nurse.com>
This commit is contained in:
parent
e3a5f03e24
commit
76d197f0dd
|
|
@ -6,8 +6,15 @@ using Microsoft.AspNetCore.ResponseCaching;
|
|||
|
||||
namespace Microsoft.AspNetCore.Builder
|
||||
{
|
||||
/// <summary>
|
||||
/// Extension methods for adding the <see cref="ResponseCachingMiddleware"/> to an application.
|
||||
/// </summary>
|
||||
public static class ResponseCachingExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds the <see cref="ResponseCachingMiddleware"/> for caching HTTP responses.
|
||||
/// </summary>
|
||||
/// <param name="app">The <see cref="IApplicationBuilder"/>.</param>
|
||||
public static IApplicationBuilder UseResponseCaching(this IApplicationBuilder app)
|
||||
{
|
||||
if (app == null)
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ using Microsoft.Net.Http.Headers;
|
|||
|
||||
namespace Microsoft.AspNetCore.ResponseCaching
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable HTTP response caching.
|
||||
/// </summary>
|
||||
public class ResponseCachingMiddleware
|
||||
{
|
||||
private static readonly TimeSpan DefaultExpirationTimeSpan = TimeSpan.FromSeconds(10);
|
||||
|
|
@ -29,6 +32,13 @@ namespace Microsoft.AspNetCore.ResponseCaching
|
|||
private readonly IResponseCache _cache;
|
||||
private readonly IResponseCachingKeyProvider _keyProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ResponseCachingMiddleware"/>.
|
||||
/// </summary>
|
||||
/// <param name="next">The <see cref="RequestDelegate"/> representing the next middleware in the pipeline.</param>
|
||||
/// <param name="options">The options for this middleware.</param>
|
||||
/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param>
|
||||
/// <param name="poolProvider">The <see cref="ObjectPoolProvider"/> used for creating <see cref="ObjectPool"/> instances.</param>
|
||||
public ResponseCachingMiddleware(
|
||||
RequestDelegate next,
|
||||
IOptions<ResponseCachingOptions> options,
|
||||
|
|
@ -88,6 +98,11 @@ namespace Microsoft.AspNetCore.ResponseCaching
|
|||
_keyProvider = keyProvider;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the logic of the middleware.
|
||||
/// </summary>
|
||||
/// <param name="httpContext">The <see cref="HttpContext"/>.</param>
|
||||
/// <returns>A <see cref="Task"/> that completes when the middleware has completed processing.</returns>
|
||||
public async Task Invoke(HttpContext httpContext)
|
||||
{
|
||||
var context = new ResponseCachingContext(httpContext, _logger);
|
||||
|
|
|
|||
Loading…
Reference in New Issue