HttpCachePolicyWrapper.SetCacheability 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將 Cache-Control
標頭設定為其中一個 HttpCacheability 值。
多載
SetCacheability(HttpCacheability) |
將 |
SetCacheability(HttpCacheability, String) |
將 |
SetCacheability(HttpCacheability)
將 Cache-Control
標頭設定為指定的 HttpCacheability 值。
public:
override void SetCacheability(System::Web::HttpCacheability cacheability);
public override void SetCacheability (System.Web.HttpCacheability cacheability);
override this.SetCacheability : System.Web.HttpCacheability -> unit
Public Overrides Sub SetCacheability (cacheability As HttpCacheability)
參數
- cacheability
- HttpCacheability
要設定標頭的目標 HttpCacheability 列舉值。
例外狀況
cacheability
不是其中一個列舉值。
適用於
SetCacheability(HttpCacheability, String)
將 Cache-Control
標頭設定為指定的 HttpCacheability 值,並將擴充功能附加至指示詞。
public:
override void SetCacheability(System::Web::HttpCacheability cacheability, System::String ^ field);
public override void SetCacheability (System.Web.HttpCacheability cacheability, string field);
override this.SetCacheability : System.Web.HttpCacheability * string -> unit
Public Overrides Sub SetCacheability (cacheability As HttpCacheability, field As String)
參數
- cacheability
- HttpCacheability
要設定標頭的目標 HttpCacheability 列舉值。
- field
- String
要加入標頭中的快取控制項擴充功能。
例外狀況
field
為 null
。