HttpCachePolicyWrapper.SetCacheability Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the Cache-Control
header to one of the HttpCacheability values.
Overloads
SetCacheability(HttpCacheability) |
Sets the |
SetCacheability(HttpCacheability, String) |
Sets the |
SetCacheability(HttpCacheability)
Sets the Cache-Control
header to the specified HttpCacheability value.
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)
Parameters
- cacheability
- HttpCacheability
The HttpCacheability enumeration value to set the header to.
Exceptions
cacheability
is not one of the enumeration values.
Applies to
SetCacheability(HttpCacheability, String)
Sets the Cache-Control
header to the specified HttpCacheability value and appends an extension to the directive.
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)
Parameters
- cacheability
- HttpCacheability
The HttpCacheability enumeration value to set the header to.
- field
- String
The cache-control extension to add to the header.
Exceptions
field
is null
.