DataFormWebPart.DfwpCacheWrite Method
Writes an item to the cache, based on a key.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Protected Overridable Sub DfwpCacheWrite ( _
storage As Storage, _
key As String, _
forceSharedAppCache As Boolean, _
value As Object, _
timeoutSecs As Integer _
)
'Usage
Dim storage As Storage
Dim key As String
Dim forceSharedAppCache As Boolean
Dim value As Object
Dim timeoutSecs As Integer
Me.DfwpCacheWrite(storage, key, forceSharedAppCache, _
value, timeoutSecs)
protected virtual void DfwpCacheWrite(
Storage storage,
string key,
bool forceSharedAppCache,
Object value,
int timeoutSecs
)
Parameters
storage
Type: Microsoft.SharePoint.WebPartPages.StorageAn enumeration that specifies how the property will be stored.
key
Type: System.StringThe identifier for the cache item to retrieve.
forceSharedAppCache
Type: System.Booleantrue to cause the caching code to not generate a key scoped to the current page or Web Part state; otherwise, false.
value
Type: System.ObjectAn object representing a value.
timeoutSecs
Type: System.Int32A 32-bit signed integer representing the time, in seconds, until the request fails.
Remarks
This method computes a per-user key when non-shared storage is specified. The forceSharedAppCache parameter allows calling applications to cache items such as linked XSLs across pages.
Certain types of requests cannot use the Web Part cache.