HttpCachePolicyWrapper.SetCacheability 方法

定义

Cache-Control 标头设置为 HttpCacheability 值之一。

重载

SetCacheability(HttpCacheability)

Cache-Control 标头设置为指定的 HttpCacheability 值。

SetCacheability(HttpCacheability, String)

Cache-Control 标头设置为指定的 HttpCacheability 值,并向该指令追加一个扩展。

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

要添加到标头的缓存控制扩展。

例外

fieldnull

cacheability 不是 PrivateNoCache

适用于