3 instantiations of ResponseCachingContext
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingMiddleware.cs (1)
87
var context = new
ResponseCachingContext
(httpContext, _logger);
Microsoft.AspNetCore.ResponseCaching.Tests (2)
TestUtils.cs (2)
229
return new
ResponseCachingContext
(new DefaultHttpContext(), NullLogger.Instance)
237
return new
ResponseCachingContext
(new DefaultHttpContext(), new TestLogger("ResponseCachingTests", testSink, true))
134 references to ResponseCachingContext
Microsoft.AspNetCore.ResponseCaching (36)
Interfaces\IResponseCachingKeyProvider.cs (6)
11
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
13
string CreateBaseKey(
ResponseCachingContext
context);
18
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
20
string CreateStorageVaryByKey(
ResponseCachingContext
context);
25
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
27
IEnumerable<string> CreateLookupVaryByKeys(
ResponseCachingContext
context);
Interfaces\IResponseCachingPolicyProvider.cs (10)
11
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
13
bool AttemptResponseCaching(
ResponseCachingContext
context);
18
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
20
bool AllowCacheLookup(
ResponseCachingContext
context);
25
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
27
bool AllowCacheStorage(
ResponseCachingContext
context);
32
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
34
bool IsResponseCacheable(
ResponseCachingContext
context);
39
/// <param name="context">The <see cref="
ResponseCachingContext
"/>.</param>
41
bool IsCachedEntryFresh(
ResponseCachingContext
context);
ResponseCachingKeyProvider.cs (4)
31
public IEnumerable<string> CreateLookupVaryByKeys(
ResponseCachingContext
context)
37
public string CreateBaseKey(
ResponseCachingContext
context)
75
public string CreateStorageVaryByKey(
ResponseCachingContext
context)
82
throw new InvalidOperationException($"{nameof(CachedVaryByRules)} must not be null on the {nameof(
ResponseCachingContext
)}");
ResponseCachingMiddleware.cs (11)
87
var
context = new ResponseCachingContext(httpContext, _logger);
136
internal async Task<bool> TryServeCachedResponseAsync(
ResponseCachingContext
context, IResponseCacheEntry? cacheEntry)
204
internal async Task<bool> TryServeFromCacheAsync(
ResponseCachingContext
context)
246
private bool OnFinalizeCacheHeaders(
ResponseCachingContext
context)
327
internal void FinalizeCacheHeaders(
ResponseCachingContext
context)
335
internal void FinalizeCacheBody(
ResponseCachingContext
context)
372
private bool OnStartResponse(
ResponseCachingContext
context)
384
internal void StartResponse(
ResponseCachingContext
context)
401
internal void ShimResponseStream(
ResponseCachingContext
context)
419
internal static void UnshimResponseStream(
ResponseCachingContext
context)
428
internal static bool ContentIsNotModified(
ResponseCachingContext
context)
ResponseCachingPolicyProvider.cs (5)
12
public bool AttemptResponseCaching(
ResponseCachingContext
context)
33
public bool AllowCacheLookup(
ResponseCachingContext
context)
60
public bool AllowCacheStorage(
ResponseCachingContext
context)
66
public bool IsResponseCacheable(
ResponseCachingContext
context)
166
public bool IsCachedEntryFresh(
ResponseCachingContext
context)
Microsoft.AspNetCore.ResponseCaching.Tests (98)
ResponseCachingKeyProviderTests.cs (13)
17
var
context = TestUtils.CreateTestContext();
35
var
context = TestUtils.CreateTestContext();
49
var
context = TestUtils.CreateTestContext();
60
var
context = TestUtils.CreateTestContext();
69
var
context = TestUtils.CreateTestContext();
82
var
context = TestUtils.CreateTestContext();
98
var
context = TestUtils.CreateTestContext();
114
var
context = TestUtils.CreateTestContext();
130
var
context = TestUtils.CreateTestContext();
146
var
context = TestUtils.CreateTestContext();
164
var
context = TestUtils.CreateTestContext();
182
var
context = TestUtils.CreateTestContext();
200
var
context = TestUtils.CreateTestContext();
ResponseCachingMiddlewareTests.cs (38)
23
var
context = TestUtils.CreateTestContext();
42
var
context = TestUtils.CreateTestContext();
57
var
context = TestUtils.CreateTestContext();
81
var
context = TestUtils.CreateTestContext();
110
var
context = TestUtils.CreateTestContext();
130
var
context = TestUtils.CreateTestContext();
158
var
context = TestUtils.CreateTestContext();
180
var
context = TestUtils.CreateTestContext(sink);
192
var
context = TestUtils.CreateTestContext(sink);
223
var
context = TestUtils.CreateTestContext(sink);
257
var
context = TestUtils.CreateTestContext(sink);
276
var
context = TestUtils.CreateTestContext(sink);
292
var
context = TestUtils.CreateTestContext(sink);
319
var
context = TestUtils.CreateTestContext(sink);
334
var
context = TestUtils.CreateTestContext(sink);
347
var
context = TestUtils.CreateTestContext(sink);
366
var
context = TestUtils.CreateTestContext();
382
var
context = TestUtils.CreateTestContext();
401
var
context = TestUtils.CreateTestContext();
421
var
context = TestUtils.CreateTestContext();
436
var
context = TestUtils.CreateTestContext();
456
var
context = TestUtils.CreateTestContext();
476
var
context = TestUtils.CreateTestContext();
501
var
context = TestUtils.CreateTestContext();
523
var
context = TestUtils.CreateTestContext();
552
var
context = TestUtils.CreateTestContext();
602
var
context = TestUtils.CreateTestContext();
623
var
context = TestUtils.CreateTestContext();
641
var
context = TestUtils.CreateTestContext();
659
var
context = TestUtils.CreateTestContext();
674
var
context = TestUtils.CreateTestContext();
692
var
context = TestUtils.CreateTestContext();
720
var
context = TestUtils.CreateTestContext();
749
var
context = TestUtils.CreateTestContext();
780
var
context = TestUtils.CreateTestContext();
808
var
context = TestUtils.CreateTestContext();
828
var
context = TestUtils.CreateTestContext();
855
var
context = TestUtils.CreateTestContext();
ResponseCachingPolicyProviderTests.cs (37)
29
var
context = TestUtils.CreateTestContext(sink);
58
var
context = TestUtils.CreateTestContext(sink);
71
var
context = TestUtils.CreateTestContext(sink);
85
var
context = TestUtils.CreateTestContext(sink);
100
var
context = TestUtils.CreateTestContext(sink);
117
var
context = TestUtils.CreateTestContext(sink);
131
var
context = TestUtils.CreateTestContext(sink);
144
var
context = TestUtils.CreateTestContext(sink);
159
var
context = TestUtils.CreateTestContext(sink);
171
var
context = TestUtils.CreateTestContext(sink);
185
var
context = TestUtils.CreateTestContext(sink);
202
var
context = TestUtils.CreateTestContext(sink);
219
var
context = TestUtils.CreateTestContext(sink);
236
var
context = TestUtils.CreateTestContext(sink);
253
var
context = TestUtils.CreateTestContext(sink);
271
var
context = TestUtils.CreateTestContext(sink);
347
var
context = TestUtils.CreateTestContext(sink);
364
var
context = TestUtils.CreateTestContext(sink);
383
var
context = TestUtils.CreateTestContext(sink);
406
var
context = TestUtils.CreateTestContext(sink);
426
var
context = TestUtils.CreateTestContext(sink);
448
var
context = TestUtils.CreateTestContext(sink);
468
var
context = TestUtils.CreateTestContext(sink);
490
var
context = TestUtils.CreateTestContext(sink);
504
var
context = TestUtils.CreateTestContext(sink);
522
var
context = TestUtils.CreateTestContext(sink);
543
var
context = TestUtils.CreateTestContext(sink);
563
var
context = TestUtils.CreateTestContext(sink);
585
var
context = TestUtils.CreateTestContext(sink);
606
var
context = TestUtils.CreateTestContext(sink);
628
var
context = TestUtils.CreateTestContext(sink);
652
var
context = TestUtils.CreateTestContext(sink);
674
var
context = TestUtils.CreateTestContext(sink);
698
var
context = TestUtils.CreateTestContext(sink);
721
var
context = TestUtils.CreateTestContext(sink);
745
var
context = TestUtils.CreateTestContext(sink);
770
var
context = TestUtils.CreateTestContext(sink);
TestUtils.cs (10)
227
internal static
ResponseCachingContext
CreateTestContext()
235
internal static
ResponseCachingContext
CreateTestContext(ITestSink testSink)
323
public bool AllowCacheLookup(
ResponseCachingContext
context) => AllowCacheLookupValue;
325
public bool AllowCacheStorage(
ResponseCachingContext
context) => AllowCacheStorageValue;
327
public bool AttemptResponseCaching(
ResponseCachingContext
context) => AttemptResponseCachingValue;
329
public bool IsCachedEntryFresh(
ResponseCachingContext
context) => IsCachedEntryFreshValue;
331
public bool IsResponseCacheable(
ResponseCachingContext
context) => IsResponseCacheableValue;
348
public IEnumerable<string> CreateLookupVaryByKeys(
ResponseCachingContext
context)
356
public string CreateBaseKey(
ResponseCachingContext
context)
361
public string CreateStorageVaryByKey(
ResponseCachingContext
context)