Share via


IHttpCachePolicy::DisableUserCache Method

 

Disables user caching for the cache policy.

Syntax

virtual VOID DisableUserCache(  
   VOID  
) = 0;  

Parameters

This method takes no parameters.

Remarks

CHttpModule derived classes that register for request or response events receive an IHttpContext pointer as a parameter on the corresponding virtual method. To disable caching for the user, call the IHttpContext::GetResponse method, the IHttpResponse::GetCachePolicy method, and finally the DisableUserCache method.

DisableUserCache behavior depends on implementation. You should use the following information as a guideline, but it may not be correct in all scenarios:

The current default implementer of the IHttpCachePolicy interface declares a private Boolean value that determines whether caching is enabled for a user. During the construction of an implementer, this Boolean value is initialized to true. When DisableUserCache is called, this Boolean value is set to false. Once caching is disabled for a user, there is no method to reset this Boolean value to true.

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016 Technical Preview
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
- IIS Express 7.5, IIS Express 8.0, IIS Express 10.0
Header Httpserv.h

See Also

IHttpCachePolicy Interface