HttpCachePolicyBase.SetCacheability 方法

定义

在派生类中重写时,将 Cache-Control 标头设置为 HttpCacheability 值之一。

重载

SetCacheability(HttpCacheability)

在派生类中重写时,将 Cache-Control 标头设置为指定 HttpCacheability 值。

SetCacheability(HttpCacheability, String)

在派生类中重写时,将 Cache-Control 标头设置为指定的 HttpCacheability 值,并向该指令追加一个扩展。

SetCacheability(HttpCacheability)

在派生类中重写时,将 Cache-Control 标头设置为指定 HttpCacheability 值。

public:
 virtual void SetCacheability(System::Web::HttpCacheability cacheability);
public virtual void SetCacheability (System.Web.HttpCacheability cacheability);
abstract member SetCacheability : System.Web.HttpCacheability -> unit
override this.SetCacheability : System.Web.HttpCacheability -> unit
Public Overridable Sub SetCacheability (cacheability As HttpCacheability)

参数

cacheability
HttpCacheability

要将标头设置为的 HttpCacheability 枚举。

例外

适用于

SetCacheability(HttpCacheability, String)

在派生类中重写时,将 Cache-Control 标头设置为指定的 HttpCacheability 值,并向该指令追加一个扩展。

public:
 virtual void SetCacheability(System::Web::HttpCacheability cacheability, System::String ^ field);
public virtual void SetCacheability (System.Web.HttpCacheability cacheability, string field);
abstract member SetCacheability : System.Web.HttpCacheability * string -> unit
override this.SetCacheability : System.Web.HttpCacheability * string -> unit
Public Overridable Sub SetCacheability (cacheability As HttpCacheability, field As String)

参数

cacheability
HttpCacheability

要将标头设置为的 HttpCacheability 枚举。

field
String

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

例外

适用于