Couldn't get the Event name with StatusViewer Sample

The caching behavior was changed as part of an optimization in the MIP SDK. Unfortunately, the sample was not updated to reflect this change.

There are two ways to update the sample that will resolve the issue you’re seeing.

Option 1 — clear the cache when needed

Add the following line at line 262 in MainForm.cs:

VideoOS.Platform.Configuration.Instance.ConfigurationApiManager.ClearCache(); //added to the sample
var configItem = VideoOS.Platform.ConfigurationItems.Factory.GetConfigurationItem(detail.FQID); // original line 262

Option 2 — disable REST API caching entirely

Add the following line to the OnLoad method in MainForm.cs:

VideoOS.Platform.Proxy.ConfigApi.ConfigurationApiManager.EnableRestApiCaching = false;
// added to the sample to ensure we always get the latest configuration data from the server

If you are working with ConfigurationItem in a scenario where you must always read the most up-to-date configuration, use the second option.
If you need to read many items and cached values are acceptable, the first option provides better performance by clearing the cache only when required.

1 Like