Cache
- Updated2026-01-20
- 1 minute(s) read
Gets or sets whether to cache the value of properties.
Syntax
Namespace: NationalInstruments.ModularInstruments.NISwitch
public bool Cache { get; set; }
Remarks
If you set this property to true, NI-SWITCH tracks the current NI-SWITCH device settings and avoids sending redundant commands to the device. NI-SWITCH can always cache or never cache particular properties, regardless of the setting of this property.
Returns
true if caching is enabled; otherwise, false. The default value is true.
Exceptions
| Type | Description |
|---|---|
| System.ObjectDisposedException | The Cache was accessed after the associated NISwitch object was disposed. |