Creating Cache Groups

Cache group folders define the data refresh schedules for the mobile business objects (MBOs) within them. Create as many cache groups as required to meet the varying data refresh needs of the MBOs for a given mobile application project.

  1. Switch to the Advanced developer profile by right-clicking in the Mobile Application Diagram and selecting Switch developer profile > Advanced.
  2. To launch the New Cache Group wizard, either:
    • Right-click any folder from the WorkSpace Navigator, and select New > Cache Group, or
    • From Unwired WorkSpace, select File > New > Cache Group.
  3. Specify general properties and the data refresh schedule for the cache group and click Finish.
    • Mobile application project – the mobile application project to which this cache group belongs. This option does not appear if you launch the wizard from the WorkSpace Navigator.
    • Name – name of the cache group.
    • Description – an optional description.
    • Policy – select the policy to be used by all MBOs within the cache group. The cache group policy determines the method and timing by which the Unwired Server cache is refreshed from the enterprise information system (EIS) for all MBOs within the cache group:
      Policy Description

      On demand

      Application logic combined with the cache interval determines when a cache refresh is triggered. The cache is not updated until a request is made of the cache and the cache has expired. If a request is made of the cache and it has expired, there may be a delay responding to the request while the cache is refreshed.

      You can select Partition by Requester and Device Identity only if using an On demand policy. To enable, select this option from the Cache Group Property Policies tab.

      Scheduled

      The cache is refreshed when a scheduled task executes, and can be defined by the Unwired Server administrator or by setting the cache interval. Note that load parameters filled from transient personalization keys can not be used with a scheduled cache type.

      DCN

      The cache never expires. Data refresh is triggered by an EIS Data Change Notification. The cache interval fields are disabled when DCN is selected.

      Online

      Used strictly with Mobile Workflow applications where access to real-time EIS data is required, bypassing the Unwired Server cache (CDB). See Online Cache Group Policy
    • Cache interval – used by both On demand and Scheduled, the cache interval allows you to associate an interval (hour, minute, seconds, and so on) for the cache group. If an application tries to synchronize:
      • Before the cache interval expires – the client application receives the data currently in the Unwired Server cache database (CDB).
      • After the cache interval expires – the CDB is refreshed from the enterprise information system (EIS), and the client synchronizes with the data in the CDB.

        If the cache interval is set to zero, each device-initiated synchronization refreshes the entire cache prior to synchronization. While this ensures the device receives up-to-date EIS data, it is costly in terms of resources.

        A Scheduled cache policy does not support a zero interval.

        Examples include:
        • An On demand policy with a 0 cache interval – each client request for data results in the data being retrieved from the EIS and delivered to the client through the cache, but the cache is immediately invalidated, ensuring the most current EIS data is available to clients.
        • An On demand setting with a two hour cache interval – after each cache refresh, the cache is valid for two hours. Each client request for data is serviced by the cache. When a client requests data at least two hours after the last data refresh, the cache is refreshed from the EIS and the cache interval resets for two hours.
        • A Scheduled setting with a 24 hour cache interval setting – the data is refreshed every 24 hours.
    • Use as default cache group – identifies this cache group as the project's default. All MBOs automatically belong to the default cache group when created, except for local business objects, which cannot belong to a cache group.