Export (0) Print
Expand All

WebPart.CacheType property

Determines the type of caching being used by the Web server.

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

protected CacheType CacheType { get; }

Property value

Type: Microsoft.SharePoint.WebPartPages.CacheType
A CacheType enumeration value.

If the type of caching for the Web server is set to Database (in the web.config file <WebPartCache Storage="Database" />), and code in a Web Part tries to cache an object that is not marked as Serializable, then the object is not be cached and performance is affected. To optimize your code, use the CacheType property to prevent caching from being used in this case.

Community Additions

Show:
© 2014 Microsoft