Skip to content

Commit 76d197f

Browse files
Marusykanalogrelay
andauthored
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>
1 parent e3a5f03 commit 76d197f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/Middleware/ResponseCaching/src/ResponseCachingExtensions.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@
66

77
namespace Microsoft.AspNetCore.Builder
88
{
9+
/// <summary>
10+
/// Extension methods for adding the <see cref="ResponseCachingMiddleware"/> to an application.
11+
/// </summary>
912
public static class ResponseCachingExtensions
1013
{
14+
/// <summary>
15+
/// Adds the <see cref="ResponseCachingMiddleware"/> for caching HTTP responses.
16+
/// </summary>
17+
/// <param name="app">The <see cref="IApplicationBuilder"/>.</param>
1118
public static IApplicationBuilder UseResponseCaching(this IApplicationBuilder app)
1219
{
1320
if (app == null)

src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
namespace Microsoft.AspNetCore.ResponseCaching
1616
{
17+
/// <summary>
18+
/// Enable HTTP response caching.
19+
/// </summary>
1720
public class ResponseCachingMiddleware
1821
{
1922
private static readonly TimeSpan DefaultExpirationTimeSpan = TimeSpan.FromSeconds(10);
@@ -29,6 +32,13 @@ public class ResponseCachingMiddleware
2932
private readonly IResponseCache _cache;
3033
private readonly IResponseCachingKeyProvider _keyProvider;
3134

35+
/// <summary>
36+
/// Creates a new <see cref="ResponseCachingMiddleware"/>.
37+
/// </summary>
38+
/// <param name="next">The <see cref="RequestDelegate"/> representing the next middleware in the pipeline.</param>
39+
/// <param name="options">The options for this middleware.</param>
40+
/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param>
41+
/// <param name="poolProvider">The <see cref="ObjectPoolProvider"/> used for creating <see cref="ObjectPool"/> instances.</param>
3242
public ResponseCachingMiddleware(
3343
RequestDelegate next,
3444
IOptions<ResponseCachingOptions> options,
@@ -88,6 +98,11 @@ internal ResponseCachingMiddleware(
8898
_keyProvider = keyProvider;
8999
}
90100

101+
/// <summary>
102+
/// Invokes the logic of the middleware.
103+
/// </summary>
104+
/// <param name="httpContext">The <see cref="HttpContext"/>.</param>
105+
/// <returns>A <see cref="Task"/> that completes when the middleware has completed processing.</returns>
91106
public async Task Invoke(HttpContext httpContext)
92107
{
93108
var context = new ResponseCachingContext(httpContext, _logger);

0 commit comments

Comments
 (0)