SPContext.ClearCachedWeb method

Removes a web that has previously been cached for this context.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


Public Function ClearCachedWeb ( _
    key As String _
) As Boolean
Dim instance As SPContext
Dim key As String
Dim returnValue As Boolean

returnValue = instance.ClearCachedWeb(key)
public bool ClearCachedWeb(
    string key


  • key
    Type: System.String

    The key specified when caching the web.

Return value

Type: System.Boolean
true if the web was found in the cache and successfully removed; otherwise false.


If this method is called, the web will no longer be disposed automatically at the end of the request.

See also


SPContext class

SPContext members

Microsoft.SharePoint namespace