PublishingHttpModule.DontChangeCacheHeadersForRequest Method
Prevents the caching mechanism from changing cache headers for a specific request.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Shared Sub DontChangeCacheHeadersForRequest ( _
context As HttpContext _
)
'Usage
Dim context As HttpContextPublishingHttpModule.DontChangeCacheHeadersForRequest(context)
public static void DontChangeCacheHeadersForRequest(
HttpContext context
)
Parameters
context
Type: System.Web.HttpContextThe current HTTP context.
Remarks
By default, Microsoft SharePoint Foundation sets a variety of cache headers to disallow caching from occurring on ASPX pages. By calling this method and passing the current context, you can bypass this default behavior. You can bypass the default behavior by setting HttpContext.Items["DontSetCacheHeaders"]=1.