94 references to CacheControl
CodeGenerator (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
109HeaderNames.CacheControl,
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
366if (responseHeaders.TryGetValue(HeaderNames.CacheControl, out var cacheControlHeader) &&
Microsoft.AspNetCore.Components.Endpoints (2)
Builder\ResourceCollectionUrlEndpoint.cs (2)
226context.Response.Headers[HeaderNames.CacheControl] = "max-age=31536000, immutable"; 231context.Response.Headers[HeaderNames.CacheControl] = "no-cache, must-revalidate";
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (1)
107fileContext.Context.Response.Headers.Append(HeaderNames.CacheControl, "no-cache");
Microsoft.AspNetCore.HeaderParsing (1)
CommonHeaders.cs (1)
40public static HeaderSetup<CacheControlHeaderValue> CacheControl => new(HeaderNames.CacheControl, CacheControlHeaderValueParser.Instance, cacheable: true);
Microsoft.AspNetCore.HeaderParsing.Tests (3)
CommonHeadersTests.cs (1)
47Assert.Equal(HeaderNames.CacheControl, CommonHeaders.CacheControl.HeaderName);
HeaderParsingFeatureTests.cs (2)
196Context.Request.Headers[HeaderNames.CacheControl] = "max-age=604800"; 211latest.Tags["aspnetcore.header_parsing.header.name"].Should().Be(HeaderNames.CacheControl);
Microsoft.AspNetCore.Http.Extensions (4)
RequestHeaders.cs (2)
98return Headers.Get<CacheControlHeaderValue>(HeaderNames.CacheControl); 102Headers.Set(HeaderNames.CacheControl, value);
ResponseHeaders.cs (2)
38return Headers.Get<CacheControlHeaderValue>(HeaderNames.CacheControl); 42Headers.Set(HeaderNames.CacheControl, value);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
49var result = context.Request.GetTypedHeaders().Get<CacheControlHeaderValue>(HeaderNames.CacheControl);
Microsoft.AspNetCore.Http.Features (2)
IHeaderDictionary.Keyed.cs (2)
65StringValues CacheControl { get => this[HeaderNames.CacheControl]; set => this[HeaderNames.CacheControl] = value; }
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingOptions.cs (1)
39HeaderNames.CacheControl,
Microsoft.AspNetCore.Mvc.Core (2)
Filters\ResponseCacheFilterExecutor.cs (2)
73headers.Remove(HeaderNames.CacheControl); 99headers.AppendCommaSeparatedValues(HeaderNames.CacheControl, "no-cache");
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheEntryFormatter.cs (1)
415HeaderNames.CacheControl,
Microsoft.AspNetCore.ResponseCaching.Tests (13)
ResponseCachingPolicyProviderTests.cs (13)
508context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 526context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 547context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 567context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 589context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 610context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 634context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 658context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 682context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 705context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 729context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 753context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue() 778context.CachedResponseHeaders[HeaderNames.CacheControl] = new CacheControlHeaderValue()
Microsoft.AspNetCore.Server.HttpSys (10)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
671var cacheControlHeader = response.Headers[HeaderNames.CacheControl];
src\Shared\HttpSys\NativeInterop\HttpApiTypes.cs (1)
23HeaderNames.CacheControl,
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
29HeaderNames.CacheControl, HeaderNames.Expect, HeaderNames.MaxForwards, HeaderNames.Pragma, HeaderNames.Range, HeaderNames.TE,
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (7)
1177if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 1409if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 1657if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 2034if (string.Equals(key, HeaderNames.CacheControl, StringComparison.Ordinal)) 2227yield return HeaderNames.CacheControl; 2563yield return new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, CacheControl); 2756HttpSysRequestHeader.CacheControl => HeaderNames.CacheControl,
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
RequestHeaderTests.cs (1)
287yield return (HttpSysRequestHeader.CacheControl, HeaderNames.CacheControl);
Microsoft.AspNetCore.Server.IIS (9)
src\Shared\HttpSys\NativeInterop\HttpApiTypes.cs (1)
23HeaderNames.CacheControl,
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
29HeaderNames.CacheControl, HeaderNames.Expect, HeaderNames.MaxForwards, HeaderNames.Pragma, HeaderNames.Range, HeaderNames.TE,
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (7)
1177if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 1409if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 1657if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 2034if (string.Equals(key, HeaderNames.CacheControl, StringComparison.Ordinal)) 2227yield return HeaderNames.CacheControl; 2563yield return new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, CacheControl); 2756HttpSysRequestHeader.CacheControl => HeaderNames.CacheControl,
Microsoft.AspNetCore.Server.Kestrel.Core (28)
Internal\Http\HttpHeaders.Generated.cs (28)
302HeaderNames.CacheControl, 3254if (ReferenceEquals(HeaderNames.CacheControl, key)) 3291if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 4062if (ReferenceEquals(HeaderNames.CacheControl, key)) 4087if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 5037if (ReferenceEquals(HeaderNames.CacheControl, key)) 5078if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 6144if (ReferenceEquals(HeaderNames.CacheControl, key)) 6185if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 7181array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _headers._CacheControl); 7757nameStr = HeaderNames.CacheControl; 7987nameStr = HeaderNames.CacheControl; 8231nameStr = HeaderNames.CacheControl; 8489_current = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _collection._headers._CacheControl); 9241ValidateHeaderValueCharacters(HeaderNames.CacheControl, value, EncodingSelector); 11296if (ReferenceEquals(HeaderNames.CacheControl, key)) 11342if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 11988if (ReferenceEquals(HeaderNames.CacheControl, key)) 12019if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 12733if (ReferenceEquals(HeaderNames.CacheControl, key)) 12784if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 13625if (ReferenceEquals(HeaderNames.CacheControl, key)) 13676if (HeaderNames.CacheControl.Equals(key, StringComparison.OrdinalIgnoreCase)) 14580array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _headers._CacheControl); 15338_current = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _collection._headers._CacheControl); 15947if (!TryGetUnknown(HeaderNames.CacheControl, ref value)) 15956ValidateHeaderValueCharacters(HeaderNames.CacheControl, value, EncodingSelector); 15957SetValueUnknown(HeaderNames.CacheControl, value);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
109HeaderNames.CacheControl,
Microsoft.AspNetCore.Shared.Tests (9)
src\Shared\HttpSys\NativeInterop\HttpApiTypes.cs (1)
23HeaderNames.CacheControl,
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
29HeaderNames.CacheControl, HeaderNames.Expect, HeaderNames.MaxForwards, HeaderNames.Pragma, HeaderNames.Range, HeaderNames.TE,
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (7)
1177if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 1409if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 1657if (string.Equals(key, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 2034if (string.Equals(key, HeaderNames.CacheControl, StringComparison.Ordinal)) 2227yield return HeaderNames.CacheControl; 2563yield return new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, CacheControl); 2756HttpSysRequestHeader.CacheControl => HeaderNames.CacheControl,
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyMiddleware.cs (1)
55context.Response.Headers[HeaderNames.CacheControl] = "no-cache, no-store, must-revalidate, max-age=0";
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
261if (string.Equals(responseHeader.Name, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) 266responseHeaders.Insert(i, new StaticAssetResponseHeader(HeaderNames.CacheControl, "no-cache"));