
HttpCacheVaryByParams | 491
System.Web
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
dependencies that a cached page may have and either allow the page to be served or
invalidate it and require the page to be recompiled. To invalidate a page, set the valida-
tionStatus parameter to HttpValidationStatus.Invalid.
Passed To
HttpCachePolicy.AddValidationCallback( )
HttpCacheVaryByHeaders
System.Web (system.web.dll)
sealed class
This class is used to set the VaryByHeaders property of the HttpCachePolicy class. It allows you
to specify that separate versions of a page should be cached for different languages or
character sets. For example, if you set the UserCharSet property of this class to True, the
“Accept-Charset” field will be included in the HTTP Vary header and a separate
version of the page will be cached for each request that has a different character set.
The cache page will be reused only among requests that have the same Accept-Charset
header.
Alternatively, if type safety is not important, you can set the default Item property to a
string that contains the name of a header, or a list of header names separated by semi-
colons (;). Cached pages will then be reused only among requests that have the same
values for the headers you identify.
Returned By
HttpCachePolicy.VaryByHeaders
HttpCacheVaryByParams
System.Web (system.web.dll) ...