HttpCachePolicy.AppendCacheExtension Method

Appends the specified text to the Cache-Control HTTP header.

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

public:
void AppendCacheExtension (
	String^ extension
)
public void AppendCacheExtension (
	String extension
)
public function AppendCacheExtension (
	extension : String
)

Parameters

extension

The text to append to the Cache-Control header.

Exception typeCondition

ArgumentNullException

extension is a null reference (Nothing in Visual Basic).

If the browser does not recognize cache control directives or extensions, the browser must ignore the unrecognized terms. For more information, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, available on the World Wide Web Consortium (W3C) Web site.

The following code example demonstrates the use of a cache-control extension supported by Internet Explorer. The server is indicating to the browser that the content will not change for one hour (pre-check=3600) and instructs it to retrieve the content directly from the local cache. However, if the content is modified by the server and the page is requested by the user within a fifteen-minute (post-check= 900) to one-hour period, the browser displays the information found in the local cache but also performs a background check and optional fetch of the new content on the server.

No code example is currently available or this language may not be supported.
get_Response().get_Cache().
    AppendCacheExtension("post-check=900,pre-check=3600");

Response.Cache.AppendCacheExtension("post-check=900,pre-check=3600")
    

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.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: