Select to view content in your preferred language

OnDemandCacheSize and FeatureDataGrid - unexpected behavior?

522
1
01-17-2011 03:43 AM
MarkJagt
New Contributor
If I set the OnDemandCacheSize to '0', and start panning the map, the number of features in a FeatureDataGrid keep adding up with every pan action. This behavior can be repeated in the following example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataGrid.

If the OnDemandCacheSize is set to anything other than '0', the number of features in the FeatureDataGrid seem to represent the number of features within the map extent + the OnDemandCacheSize size.

Any ideas if this might be a bug or am I missing setting some obligatory attributes in XAML (even though the same behavior is seen in the ESRI example)? Or does '0' in the case of OnDemandCacheSize mean infinite, which does not sound logical to me?

Any Ideas?

Regards,
Mark
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
This number dictates how many features will be held in the cache as documented here. http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLay... OnDemandCacheSize set to 0 is the same as setting DisableClientCaching to True. In both cases, no features are kept in the cache.

The behavior you see in the SDK sample is normal for OnDemandCacheSize=0. However, there was a bug related to this property prior to v2.1 where OnDemandCacheSize=0 results to the records being duplicated but this had been fixed before v2.1 final.
0 Kudos