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