0 out of 1 rated this helpful - Rate this topic

SPContext.GetCachedField Delegate

Implements a callback to check for a cached field value.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
public delegate bool GetCachedField(
	string fieldName,
	out string cachedFieldValue
)

Parameters

fieldName
Type: System.String
A string that specifies the name of the field to verify if it is cached.
cachedFieldValue
Type: System.String%
A string that contains the cached field output. This parameter can contain an empty string if there is nothing to display.

Return Value

Type: System.Boolean
true if the cache contains an item, even if the item is an empty string; otherwise, false.

To speed up rendering of field controls on non-Display form pages, you can implement a callback that caches the values. For security reasons, this callback can be used in Display mode only, and cannot be called for certain field controls (for example, for a Lookup field to a security-trimmed list). It is best practice to avoid setting callbacks on pages that have been checked out or on draft versions.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ