18 writes to CachedResponse
Microsoft.AspNetCore.OutputCaching (3)
OutputCacheContext.cs (1)
78CachedResponse = null;
OutputCacheMiddleware.cs (2)
260context.CachedResponse = cacheEntry; 405context.CachedResponse = cacheEntry;
Microsoft.AspNetCore.OutputCaching.Tests (15)
OutputCacheMiddlewareTests.cs (15)
163context.CachedResponse = entry; 177context.CachedResponse = entry; 215context.CachedResponse = entry; 257context.CachedResponse = entry; 278context.CachedResponse = entry; 296context.CachedResponse = entry; 326context.CachedResponse = entry; 342context.CachedResponse = entry; 357context.CachedResponse = entry; 616context.CachedResponse = entry; 645context.CachedResponse = entry; 678context.CachedResponse = entry; 703context.CachedResponse = entry; 775context.CachedResponse = entry; 979context.CachedResponse = entry;
22 references to CachedResponse
Microsoft.AspNetCore.OutputCaching (10)
OutputCacheContext.cs (1)
77var tmp = CachedResponse;
OutputCacheMiddleware.cs (9)
192return context.CachedResponse; 262var cacheEntryAge = context.ResponseTime.Value - context.CachedResponse.Created; 279var cachedResponse = context.CachedResponse; 310var body = context.CachedResponse.Body; 316await context.CachedResponse.CopyToAsync(response.BodyWriter, context.HttpContext.RequestAborted); 419&& context.CachedResponse is not null) 432context.CachedResponse.SetBody(cachedResponseBody, recycleBuffers: true); 442await OutputCacheEntryFormatter.StoreAsync(context.CacheKey, context.CachedResponse, context.Tags, context.CachedResponseValidFor, 518var cachedResponse = context.CachedResponse;
Microsoft.AspNetCore.OutputCaching.Tests (12)
OutputCacheMiddlewareTests.cs (12)
187SetDateHeader(context.CachedResponse, utcNow - TimeSpan.FromSeconds(10)); 192SetDateHeader(context.CachedResponse, utcNow); 197SetDateHeader(context.CachedResponse, utcNow + TimeSpan.FromSeconds(10)); 229SetDateHeaders(context.CachedResponse, utcNow + TimeSpan.FromSeconds(10), utcNow - TimeSpan.FromSeconds(10)); 234SetDateHeaders(context.CachedResponse, utcNow + TimeSpan.FromSeconds(10), utcNow); 239SetDateHeaders(context.CachedResponse, utcNow - TimeSpan.FromSeconds(10), utcNow + TimeSpan.FromSeconds(10)); 282context.CachedResponse.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.LastModified] = HeaderUtilities.FormatDate(utcNow - TimeSpan.FromSeconds(10)) }); 343context.CachedResponse.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.ETag] = "\"E2\"" }); 358context.CachedResponse.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.ETag] = "\"E2\"" }); 580Assert.Null(context.CachedResponse); 584Assert.NotNull(context.CachedResponse); 599Assert.Equal(new StringValues(new[] { "HeaderB, heaDera" }), context.CachedResponse.FindHeader(HeaderNames.Vary));