Dela via


HttpResponseHeaderCollection.CacheControl Property

Definition

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

public:
 property HttpCacheDirectiveHeaderValueCollection ^ CacheControl { HttpCacheDirectiveHeaderValueCollection ^ get(); };
HttpCacheDirectiveHeaderValueCollection CacheControl();
public HttpCacheDirectiveHeaderValueCollection CacheControl { get; }
var httpCacheDirectiveHeaderValueCollection = httpResponseHeaderCollection.cacheControl;
Public ReadOnly Property CacheControl As HttpCacheDirectiveHeaderValueCollection

Property Value

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.

Applies to

See also