Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

HttpCacheability Enumeration

Provides enumerated values that are used to set the Cache-Control HTTP header.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)
public enum HttpCacheability
Member nameDescription
NoCacheSets the Cache-Control: no-cache header. Without a field name, the directive applies to the entire request and a shared (proxy server) cache must force a successful revalidation with the origin Web server before satisfying the request. With a field name, the directive applies only to the named field; the rest of the response may be supplied from a shared cache.
PrivateDefault value. Sets Cache-Control: private to specify that the response is cacheable only on the client and not by shared (proxy server) caches.
ServerSpecifies that the response is cached only at the origin server. Similar to the NoCache option. Clients receive a Cache-Control: no-cache directive but the document is cached on the origin server. Equivalent to ServerAndNoCache.
ServerAndNoCacheApplies the settings of both Server and NoCache to indicate that the content is cached at the server but all others are explicitly denied the ability to cache the response.
PublicSets Cache-Control: public to specify that the response is cacheable by clients and shared (proxy) caches.
ServerAndPrivateIndicates that the response is cached at the server and at the client but nowhere else. Proxy servers are not allowed to cache the response.

For more information, go to RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, on the World Wide Web Consortium (W3C) Web site. In particular, for complete details, see Section 14.9 "Cache-Control" and Section 13, "Caching in HTTP."

NoteNote

NoCache does not send the common HTTP 1.0 request directive Pragma: no-cache.

TopicLocation
How to: Cache Versions of a Page Using HTTP HeadersBuilding ASP .NET Web Applications
How to: Set the Cacheability of an ASP.NET Page DeclarativelyBuilding ASP .NET Web Applications
How to: Set a Page's Cacheability ProgrammaticallyBuilding ASP .NET Web Applications
How to: Cache Page Output with File DependenciesBuilding ASP .NET Web Applications
How to: Cache Versions of a Page Using Requesting BrowserBuilding ASP .NET Web Applications
How to: Set Expiration Values for ASP.NET Page CachingBuilding ASP .NET Web Applications
How to: Cache Page Output with Cache Key DependenciesBuilding ASP .NET Web Applications
How to: Retrieve Values of Cached ItemsBuilding ASP .NET Web Applications
How to: Cache Versions of a Page Using HTTP HeadersBuilding ASP .NET Web Applications
How to: Set the Cacheability of an ASP.NET Page DeclarativelyBuilding ASP .NET Web Applications
How to: Set a Page's Cacheability ProgrammaticallyBuilding ASP .NET Web Applications
How to: Cache Page Output with File DependenciesBuilding ASP .NET Web Applications
How to: Cache Versions of a Page Using Requesting BrowserBuilding ASP .NET Web Applications
How to: Set Expiration Values for ASP.NET Page CachingBuilding ASP .NET Web Applications
How to: Cache Page Output with Cache Key DependenciesBuilding ASP .NET Web Applications
How to: Retrieve Values of Cached ItemsBuilding ASP .NET Web Applications

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.