Sets the Cache-Control header to one of the values of System.Web.HttpCacheability and appends an extension to the directive.
- cacheability
- The System.Web.HttpCacheability enumeration value to set the header to.
- field
- The cache control extension to add to the header.
The field name extension is valid only when used with the private or no-cache directives. For more information, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, available on the tp://go.microsoft.com/fwlink/?linkid=37125.
This method will throw an invalid argument exception if incompatible directives and extensions are combined.
HttpCachePolicy.SetCacheability(HttpCacheability, string) is introduced in the .NET Framework version 3.5. For more information, see The .NET Framework 3.5 Architecture.