Purging Expired DCN Data From the SAP Mobile Server Cache

Use the exp zoneless DATETIME datatype header property in DCN messages to indicate the expiration date, after which the data is purged from the SAP Mobile Server cache based on the defined Synchronization Cache Cleanup schedule.

The exp property is useful in cases where the EIS does not efficiently support delete operations. It limits cache growth on the server of unwanted data and also purges data from clients when data has expired.

  1. Include the exp property in the DCN message.

    For example, this DCN:

    {"pkg":"Test:1.0","messages":[{"id":"1","mbo":"Department", "exp":"2012-09-29 00:20:00", 
    "op":":upsert","cols":{"dept_id":"1000","dept_name":"QA1000","dept_head_id":"501"}}]}
    sets the expiration time for the cached data to 2012-09-29 00:20:00 UTC time, which is converted to local time by SAP Mobile Server.
  2. Enable the Synchronization Cache Cleanup scheduled task in SAP Control Center and define a purge schedule to remove expired data for a configured DCN cache group.
    • By default, no purge schedule is defined for a specific DCN cache group. The schedule supports logically deleting and/or physically deleting rows (dependent on whether Surrogate Key tracking is enabled) within the context of an expired data purge.
    • SAP Mobile Server automically purges composite data based on the newest node in the composite data graph. The caller must identify a graph by composite root MBO Name and Business Primary Key.
    • SAP Mobile Server generates log entries for:
      • System log info message when DCN purge executes
      • Server log for any changes to the DCN cache purge schedule