A cache group specifies the data refresh behavior for every mobile business object (MBO) within that group.
During development, you can group MBOs based on their data refresh requirements. Some terms and concepts you should be familiar with are:
-
Cache group –
includes a cache policy and the MBOs that share that policy. MBOs can belong to only one cache group.
-
Cache –
MBO data in the Unwired Server cache (also called the consolidated database, or CDB) can be refreshed according to a cache policy, along with other mechanisms, such as data change notification (DCN).
-
Cache policy –
defines the cache refresh behavior and properties for the MBOs within the cache group based on a schedule, or on demand. Each cache group contains a cache policy, which in turn contains cache refresh/update properties. When a refresh occurs, the Unwired Server calls the default read operation (for each MBO in the cache group), and all of the rows that are returned from the enterprise information system (EIS) are compared to existing rows in the CDB as follows:
-
If the CDB is empty, all rows are inserted.
- If any rows exist in the CDB, Unwired Server processes the row-set and checks (using the primary key) to determine if the row already exists in the cache:
- If it does, and all columns are the same as the EIS, nothing happens. When a client synchronizes to request all rows that have changed since the last synchronization, only rows that have changed are included, which is important for performance and efficiency.
- If the row does not exist, it is inserted and the next synchronization query retrieves the row.