| title | IHttpCachePolicy::SetIsCached Method |
|---|---|
| description | This article contains information about syntax and requirements for the IHttpCachePolicy::SetIsCached method. |
| ms.date | 10/07/2016 |
| ms.assetid | eb65432f-c325-3cda-3c56-a8f9c1cbb4d9 |
Sets a value that indicates that the data is cached.
virtual VOID SetIsCached(
VOID
) = 0; This method takes no parameters.
CHttpModule derived classes that register for request or response events receive an IHttpContext pointer as a parameter on the corresponding virtual method. To enable caching, call the IHttpContext::GetResponse method, the IHttpResponse::GetCachePolicy method, and finally the SetIsCached method.
SetIsCached 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
privateBoolean value that is initialized tofalseat construction. WhenSetIsCachedis called, this Boolean value is set totrue. AfterSetIsCachedis called, there is no method to reset this Boolean value tofalse. -
SetIsCachedreturns the value of this Boolean.
| Type | Description |
|---|---|
| Client | - IIS 7.0 on [!INCLUDEwinvista] - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
| Server | - IIS 7.0 on [!INCLUDEwinsrv2008] - 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 |
| Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 - [!INCLUDEiisexp75], [!INCLUDEiisexp80], [!INCLUDEiisexp100] |
| Header | Httpserv.h |