SPContext.GetCachedField delegate
Collapse the table of content
Expand the table of content

SPContext.GetCachedField delegate

Implements a callback to check for a cached field value.

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

public delegate bool GetCachedField(
	string fieldName,
	out string cachedFieldValue


Type: System.String

A string that specifies the name of the field to verify if it is cached.

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.

© 2015 Microsoft