HttpResponseHeaderCollection.CacheControl 屬性

定義

取得 物件的 HttpCacheDirectiveHeaderValueCollection ,這些物件代表 HTTP 回應上 Cache-Control HTTP 標頭的值。

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

屬性值

物件的集合,表示 HTTP 回應上 Cache-Control HTTP 標頭的值。 空集合表示標頭不存在。

備註

CacheControl 屬性代表 HTTP 回應上 Cache-Control HTTP 標頭的值。

Cache-Control標頭的HttpCacheDirectiveHeaderValueCollection中的某些物件會使用Windows.Foundation.TimeSpan結構。 使用 .NET 進行程式設計時,會隱藏此結構,而開發人員應該使用 System.TimeSpan 結構。 此值可以是 null,因為其類型 TimeSpan? 為 (可為 Null 的 TimeSpan) 。

在 JavaScript 中,此結構會以值的形式存取,而不是物件。 例如,使用 var a = 10000 ,而不是 var a = { duration: 10000 }

注意

在 JavaScript 中,此結構會被視為毫秒間隔數目,而不是 100 奈秒間隔的數目。

如需詳細資訊,請參閱 Windows.Foundation.TimeSpan 介面。

適用於

另請參閱