HttpCachePolicy Class (System.Web)

Switch View :
ScriptFree
.NET Framework Class Library
HttpCachePolicy Class

Contains methods for setting cache-specific HTTP headers and for controlling the ASP.NET page output cache.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class HttpCachePolicy
Visual Basic (Usage)
Dim instance As HttpCachePolicy

C#
public sealed class HttpCachePolicy
C++
public ref class HttpCachePolicy sealed
J#
public final class HttpCachePolicy
JScript
public final class HttpCachePolicy
Remarks

For background information about HTTP headers and controlling caching, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, available on the World Wide Web Consortium (W3C) Web site.

Inheritance Hierarchy

System.Object
  System.Web.HttpCachePolicy
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Framework

Supported in: 2.0, 1.1, 1.0
See Also

Community Content

Pat Miller - Microsoft
Setting the HttpCachePolicy
One thing worth noting when setting the HttpCachePolicy members is that you can not change a setting to be less restrictive.  For example, if a duration has been set for 60 seconds, it is not possible to then set it for 120 seconds.