This documentation is archived and is not being maintained.
OutputCacheLocation Enumeration
.NET Framework 1.1
Specifies the valid values for the location of the output cache.
[Visual Basic] <Serializable> Public Enum OutputCacheLocation [C#] [Serializable] public enum OutputCacheLocation [C++] [Serializable] __value public enum OutputCacheLocation [JScript] public Serializable enum OutputCacheLocation
Remarks
The values specified by this enumeration are used when you include an @ OutputCache directive in a .aspx file. These values set the cacheability of page output. For more information, see Caching ASP.NET Pages.
Members
| Member name | Description |
|---|---|
| Any | The output cache can be located on the browser client (where the request originated), on a proxy server (or any other server) participating in the request, or on the server where the request was processed. |
| Client | The output cache is located on the browser client where the request originated. |
| Downstream | The output cache can be stored in any HTTP 1.1 cache-capable devices other than the origin server. This includes proxy servers and the client that made the request. |
| None | The output cache is disabled for the requested page. |
| Server | The output cache is located on the Web server where the request was processed. |
| ServerAndClient | The output cache can be stored only at the origin server or at the requesting client. Proxy servers are not allowed to cache the response. |
Example
[Visual Basic] ' The following OutputCache directive uses the OutputCacheLocation.Server ' enumeration value to allow output caching only on the origin server. <%@ outputcache duration="10" varybyparam="none" Location="Server" %> [C#] // The following OutputCache directive uses the OutputCacheLocation.Server // enumeration value to allow output caching only on the origin server. <%@ outputcache duration="10" varybyparam="none" Location="Server" %>
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Namespace: System.Web.UI
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
Assembly: System.Web (in System.Web.dll)
See Also
System.Web.UI Namespace | @ OutputCache | Caching ASP.NET Pages | Page
Show: