Windows Dev Center

HttpResponseHeaderCollection.CacheControl | cacheControl property

Gets the HttpCacheDirectiveHeaderValueCollection of objects that represent the value of a Cache-Control HTTP header on an HTTP response.

Syntax


var cacheControl = httpResponseHeaderCollection.cacheControl;

Property value

Type: HttpCacheDirectiveHeaderValueCollection

The collection of objects that represent the value of a Cache-Control HTTP header on an HTTP response. An empty collection means that the header is absent.

Remarks

The CacheControl property represents the value of a Cache-Control HTTP header on an HTTP response.

Some of the objects in the HttpCacheDirectiveHeaderValueCollection for the Cache-Control header use the Windows.Foundation.TimeSpan structure. When programming with .NET, this structure is hidden and developers should use the System.TimeSpan structure. The value can be null, because it's typed as TimeSpan? (a nullable TimeSpan).

In JavaScript, this structure is accessed as a value, not as an object. For example, use var a = 10000, not var a = { duration: 10000 }.

Note   In JavaScript, this structure is treated as the number of millisecond intervals, not the number of 100-nanosecond intervals.
 

For more detailed information, see the Windows.Foundation.TimeSpan interface.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.winmd

See also

HttpCacheDirectiveHeaderValueCollection
HttpResponseHeaderCollection
HttpResponseMessage
HttpResponseMessage.Headers
Windows.Foundation.TimeSpan

 

 

Mostrar:
© 2015 Microsoft