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
。