6 implementations of CacheControl
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
206public StringValues CacheControl
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
206public StringValues CacheControl
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpHeaders.Generated.cs (3)
904StringValues IHeaderDictionary.CacheControl 9223StringValues IHeaderDictionary.CacheControl 15942StringValues IHeaderDictionary.CacheControl
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
206public StringValues CacheControl
39 writes to CacheControl
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
393context.Context.Response.Headers.CacheControl = "no-cache";
JwtBearerSample (1)
Startup.cs (1)
87response.Headers.CacheControl = "no-cache";
Microsoft.AspNetCore.Antiforgery (2)
Internal\DefaultAntiforgery.cs (2)
373responseHeaders.CacheControl = "no-cache, no-store"; 378responseHeaders.CacheControl = "no-cache, no-store";
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTest.cs (1)
326context.HttpContext.Response.Headers.CacheControl = "public";
Microsoft.AspNetCore.Authentication.Cookies (1)
CookieAuthenticationHandler.cs (1)
418Response.Headers.CacheControl = HeaderValueNoCacheNoStore;
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectHandler.cs (2)
294Response.Headers.CacheControl = "no-cache, no-store"; 542Response.Headers.CacheControl = "no-cache, no-store";
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
271_httpContext.Response.Headers.CacheControl = "no-cache, no-store, max-age=0";
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
256headers.CacheControl = "no-cache,no-store";
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
HealthCheckMiddleware.cs (1)
65headers.CacheControl = "no-store, no-cache";
Microsoft.AspNetCore.Hosting (1)
Internal\ErrorPageBuilder.cs (1)
31context.Response.Headers.CacheControl = "no-cache,no-store";
Microsoft.AspNetCore.Http.Connections (2)
Internal\HttpConnectionDispatcher.cs (1)
829response.Headers.CacheControl = HeaderValueNoCacheNoStore;
Internal\Transports\ServerSentEventsServerTransport.cs (1)
34context.Response.Headers.CacheControl = "no-cache,no-store";
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
47context.Request.Headers.CacheControl = "max-age=604800";
Microsoft.AspNetCore.Mvc.Core (2)
Filters\ResponseCacheFilterExecutor.cs (2)
94headers.CacheControl = "no-store"; 124headers.CacheControl = cacheControlValue;
Microsoft.AspNetCore.OutputCaching.Tests (12)
OutputCacheMiddlewareTests.cs (3)
39context.HttpContext.Request.Headers.CacheControl = new CacheControlHeaderValue() 456context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue() 482context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue()
OutputCachePolicyProviderTests.cs (8)
98context.HttpContext.Request.Headers.CacheControl = new CacheControlHeaderValue() 117context.HttpContext.Request.Headers.CacheControl = "max-age=10"; 145context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue() 163context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue() 181context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue() 227context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue() 357context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue() 380context.HttpContext.Response.Headers.CacheControl = new CacheControlHeaderValue()
OutputCacheTests.cs (1)
674var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.Headers.CacheControl = CacheControlHeaderValue.NoStoreString);
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (2)
ResponseCachingBenchmark.cs (2)
36context.Response.Headers.CacheControl = _cacheControl; 61context.Request.Headers.CacheControl = CacheControlHeaderValue.NoCacheString;
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingTests.cs (1)
619var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers.CacheControl = CacheControlHeaderValue.NoStoreString);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
Http2\Http2HPackEncoderTests.cs (3)
42headers.CacheControl = "private"; 66headers.CacheControl = "private"; 210headers.CacheControl = "你好e";
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (3)
HeaderCollectionBenchmark.cs (1)
155headers.CacheControl = "public, max-age=30672000";
ResponseHeaderCollectionBenchmark.cs (1)
123headers.CacheControl = "public, max-age=30672000";
ResponseHeadersWritingBenchmark.cs (1)
120responseHeaders.CacheControl = "public, max-age=30672000";
Microsoft.AspNetCore.Session (1)
SessionMiddleware.cs (1)
147responseHeaders.CacheControl = "no-cache,no-store";
17 references to CacheControl
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
391if (context.Context.Response.Headers.CacheControl.Count == 0)
Microsoft.AspNetCore.Antiforgery.Test (3)
DefaultAntiforgeryTest.cs (3)
311Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers.CacheControl); 342Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers.CacheControl); 504Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers.CacheControl);
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
EndpointHtmlRendererTest.cs (2)
323Assert.Equal("no-cache, no-store, max-age=0", httpContext.Response.Headers.CacheControl); 367Assert.Equal("no-cache, no-store, max-age=0", httpContext.Response.Headers.CacheControl);
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3793Assert.Equal("no-cache, no-store", response.Headers.CacheControl);
Microsoft.AspNetCore.Mvc.Core.Test (1)
Filters\ResponseCacheFilterExecutorTest.cs (1)
409Assert.Equal(cacheControlOutput, context.HttpContext.Response.Headers.CacheControl);
Microsoft.AspNetCore.ResponseCaching (8)
ResponseCachingContext.cs (2)
112HeaderUtilities.TryParseSeconds(HttpContext.Response.Headers.CacheControl, CacheControlHeaderValue.SharedMaxAgeString, out _responseSharedMaxAge); 125HeaderUtilities.TryParseSeconds(HttpContext.Response.Headers.CacheControl, CacheControlHeaderValue.MaxAgeString, out _responseMaxAge);
ResponseCachingMiddleware.cs (1)
230if (HeaderUtilities.ContainsCacheDirective(context.HttpContext.Request.Headers.CacheControl, CacheControlHeaderValue.OnlyIfCachedString))
ResponseCachingPolicyProvider.cs (5)
36var cacheControl = requestHeaders.CacheControl; 63return !HeaderUtilities.ContainsCacheDirective(context.HttpContext.Request.Headers.CacheControl, CacheControlHeaderValue.NoStoreString); 68var responseCacheControlHeader = context.HttpContext.Response.Headers.CacheControl; 169var cachedCacheControlHeaders = context.CachedResponseHeaders.CacheControl; 170var requestCacheControlHeaders = context.HttpContext.Request.Headers.CacheControl;
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
HeaderCollectionBenchmark.cs (1)
274value = headers.CacheControl;