|
When AggreGate Server first reads values of Device internal settings, it stores these values in the database. This is called setting caching. Users can then view and edit settings for any Device, even if it is not currently connected to the AggreGate Server.

|
NEW TERM: A Device Setting Variable is a variable of a Device context that corresponds to a cached Device setting.
|

|
NEW TERM: A cache is a collection of data duplicating original values stored elsewhere or computed earlier. A cache is used when the original data is expensive (usually in terms of access time) to fetch or compute, while reading the cache is "cheap" (i.e, easy and quick).
|

|
When you're viewing or editing Device settings, you're actually working with the server's cache. There is no way to edit the actual Device settings directly. New settings are written to the Device on synchronization.
|
The Settings Cache is periodically synchronized with the Device. Synchronization occurs in the following cases:
| • | When a Device connects to the AggreGate Server; |
| • | When setting values are changed in the cache (using AggreGate Client for example) while a Device is connected to the server; |
| • | Periodically, as defined by the Synchronization Interval setting. |
Every setting is synchronized according to the following algorithm:
| • | If the setting value does not exist in the server cache, it is cached (i.e. its value is read from the Device and stored in the server cache); |
| • | If the setting value in the server cache was changed later than in the Device, the cached value is written to the Device; |
| • | If the setting value in the Device was changed later than in the server cache, the cached value is replaced by the current value of the Device setting; |
| • | Otherwise, no action is performed. |
|