. |
mpiControlStatusCacheIntervalSet Declaration
Description mpiControlStatusCacheIntervalSet sets current cache refresh interval, refreshInterval, in milliseconds which defines how long cached data is considered valid. If a function that gets its data from the cache is called, and the difference between the last cache refresh time and the current time is greater than the cache refresh interval, then the cache data is automatically refreshed from the server. This call implicitly enables or disables caching. Caching is enabled when the refreshInterval is set to a nonzero value and is disabled when the refresh interval is set to zero. The valid range for the refreshInterval argument is from 0 to MPIControlMAX_STATUS_CACHE_INTERVAL, which is defined as 5000. Note: The cache refresh interval is NOT saved on the controller. It is saved in RAM in the controller object. Warning: Do not set the refresh interval lower than average refresh time. If the cache refresh interval is set to be less than the time that it takes to actually refresh the cache, then the cache will be “stale” immediately after it is refreshed. This will negatively impact system performance in that calling any status function that relies on cached data will always trigger a cache refresh. Setting the value too high will cause unnecessarily old data to be returned from the status functions that use the cache. To determine the optimum value of refreshInterval for an application, see Status Caching.
See Also Status Caching | mpiControlStatusCacheIntervalGet
|
| | Copyright © 2001-2021 Motion Engineering |