HttpCachePolicyBase.SetCacheability 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中重写时,将 Cache-Control
标头设置为 HttpCacheability 值之一。
重载
SetCacheability(HttpCacheability) |
在派生类中重写时,将 |
SetCacheability(HttpCacheability, String) |
在派生类中重写时,将 |
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
要添加到标头的缓存控制扩展。