HttpCachePolicyBase.SetCacheability Method

Definition

When overridden in a derived class, sets the Cache-Control header to one of the HttpCacheability values.

Overloads

SetCacheability(HttpCacheability)

When overridden in a derived class, sets the Cache-Control header to the specified HttpCacheability value.

SetCacheability(HttpCacheability, String)

When overridden in a derived class, sets the Cache-Control header to the specified HttpCacheability value and appends an extension to the directive.

SetCacheability(HttpCacheability)

When overridden in a derived class, sets the Cache-Control header to the specified HttpCacheability value.

public virtual void SetCacheability(System.Web.HttpCacheability cacheability);

Parameters

cacheability
HttpCacheability

The HttpCacheability enumeration value to set the header to.

Exceptions

Applies to

.NET Framework 4.8.1 и другие версии
Продукт Версии
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

SetCacheability(HttpCacheability, String)

When overridden in a derived class, sets the Cache-Control header to the specified HttpCacheability value and appends an extension to the directive.

public virtual void SetCacheability(System.Web.HttpCacheability cacheability, string field);

Parameters

cacheability
HttpCacheability

The HttpCacheability enumeration value to set the header to.

field
String

The cache-control extension to add to the header.

Exceptions

Applies to

.NET Framework 4.8.1 и другие версии
Продукт Версии
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1