WebPart.CacheType property
會決定的快取正在使用的網頁伺服器的類型。
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Protected ReadOnly Property CacheType As CacheType
Get
'用途
Dim value As CacheType
value = Me.CacheType
protected CacheType CacheType { get; }
Property value
Type: Microsoft.SharePoint.WebPartPages.CacheType
CacheType 列舉值。
備註
如果的網頁伺服器的快取類型設為資料庫 (在 web.config 檔案<WebPartCache Storage="Database" />),並在網頁組件中的程式碼會嘗試快取的未標示為序列化的物件,然後將物件不是是快取和效能會有影響。若要最佳化您的程式碼,請使用CacheType屬性可防止不在此情況下使用快取。