This documentation is archived and is not being maintained.

HttpCachePolicy.SetNoServerCaching Method

Stops all origin-server caching for the current response.

[Visual Basic]
Public Sub SetNoServerCaching()
[C#]
public void SetNoServerCaching();
[C++]
public: void SetNoServerCaching();
[JScript]
public function SetNoServerCaching();

Remarks

Explicitly denies caching of the document on the origin-server. Once set, all requests for the document are fully processed. When this method is invoked, caching cannot be reenabled for the current response.

Example

The following example disables output caching for the remainder of the response.

[Visual Basic] 
Response.Cache.SetNoServerCaching()
    

[C#] 
Response.Cache.SetNoServerCaching();
    

[C++] 
Response->Cache->SetNoServerCaching();
    

[JScript] 
Response.Cache.SetNoServerCaching()
    

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpCachePolicy Class | HttpCachePolicy Members | System.Web Namespace

Show: