Setting an Operation Cache Policy

Set an operation's cache policy from the Properties view.

  1. From the Mobile Application Diagram, click an operation to access it from the Properties view.
  2. Select the Cache Policy tab.
  3. Select the cache policy. You can select multiple cache policies for a given operation, depending on the results you want to achieve:
    Cache Policy Description
    Apply results to the cache Modifies the CDB based on the returned result set of the called MBO operation:
    • Create and update operation use this policy by default, which can be modified.
    • Delete operations use this policy which is always set and cannot be modified.
    Validation for this cache policy for Web service and SAP MBOs includes:
    • A warning message if you model a create MBO operation that does not have a Primary key definition.
    • A warning message if you model a create MBO operation if the output record does not contain the "primary-key columns"
      Operation 'Entity->create()' has 'Apply 
      results to the cache' option set without
       returning primary key fields.
    For database MBOs:
    • Unwired WorkSpace must execute a database MBO operation to retrieve the output records.
    • The output record of the ''CREATE'' operation ''{0}'' with ''Apply results to the cache'' option set does not contain the primary key columns.

      For JDBC data sources, Unwired WorkSpace does not validate whether an operation with Apply result to the cache policy returns primary key fields as part of the output record. If user want to use this policy option, you need to know whether the definition of the operation can return the primary key column or not.

    • ''CREATE'' operation ''{0}'' has ''Apply results to the cache'' option set without returning primary key fields.
    Invalidate the cache restricts invalidation to only those cache partitions affected by the create or update operation.
    An operation that uses the invalidate cache policy:
    1. Performs the create or update operation. For example, insert a new record or update an existing record in the enterprise information system (EIS).
    2. Invalidates and refreshes the cache (CDB) for those mobile business object (MBO) partitions affected by the operation, not the entire MBO instance.

      When defining MBO CUD operations, use cache invalidation sparingly, since it invalidates the entire MBO cache table. Consider using apply results instead, since this updates a single row in the cache rather than invalidating all rows in the cache for an MBO. When the client invokes a CUD operation on an MBO it can be modeled to invalidate the cache for that MBO. When an MBO cache is marked as “invalid” the next read request for that MBO refreshes the cache. This places load on the Enterprise Resource as well as the Unwired Server.

    Do not use the "Invalidate the cache" policy for an operation when the MBO is in a DCN (Data Change Notification) cache group, since the "Invalidate the cache" policy will have no effect.
    Note: To achieve optimum performance when using cache invalidating operations, result-affecting load arguments should be propagated into the MBO attributes, which are defined in the Attributes > Load Arguments tab.
    No cache update policy If you unselect all check boxes for create or update operations, the operation has no effect on the CDB. Data refresh depends on other mechanisms to update the CDB. For example, the cache group to which the MBO belongs.