14
14
15
15
namespace Microsoft . AspNetCore . ResponseCaching
16
16
{
17
+ /// <summary>
18
+ /// Enable HTTP response caching.
19
+ /// </summary>
17
20
public class ResponseCachingMiddleware
18
21
{
19
22
private static readonly TimeSpan DefaultExpirationTimeSpan = TimeSpan . FromSeconds ( 10 ) ;
@@ -29,6 +32,13 @@ public class ResponseCachingMiddleware
29
32
private readonly IResponseCache _cache ;
30
33
private readonly IResponseCachingKeyProvider _keyProvider ;
31
34
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>
32
42
public ResponseCachingMiddleware (
33
43
RequestDelegate next ,
34
44
IOptions < ResponseCachingOptions > options ,
@@ -88,6 +98,11 @@ internal ResponseCachingMiddleware(
88
98
_keyProvider = keyProvider ;
89
99
}
90
100
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>
91
106
public async Task Invoke ( HttpContext httpContext )
92
107
{
93
108
var context = new ResponseCachingContext ( httpContext , _logger ) ;
0 commit comments