PageAdapter.CacheVaryByHeaders Property
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.
Gets a list of additional HTTP headers by which caching is varied for the Web page to which this derived page adapter is attached.
public:
virtual property System::Collections::Specialized::StringCollection ^ CacheVaryByHeaders { System::Collections::Specialized::StringCollection ^ get(); };
public virtual System.Collections.Specialized.StringCollection CacheVaryByHeaders { get; }
member this.CacheVaryByHeaders : System.Collections.Specialized.StringCollection
Public Overridable ReadOnly Property CacheVaryByHeaders As StringCollection
Property Value
An IList that contains a list of HTTP headers; otherwise, null
.
Remarks
Entities on the Web that cache Web pages cache multiple versions, based on the HTTP headers and other factors. For example, a version for each language in which a page is generated is typically cached, based on the Accept-Language
HTTP header.
For specific browsers, it might be necessary to vary caching by HTTP headers in addition to the headers that control target-independent caching. For example, it might be necessary to cache different versions of a page for different screen sizes.
The header names returned by the CacheVaryByHeaders property are added to the list of headers on the Vary
HTTP header sent to the client browser.
Notes to Inheritors
When you inherit from the PageAdapter class, you can override the CacheVaryByHeaders property to return a list of the additional headers to control target-specific caching. The CacheVaryByHeaders base property returns null
.