Updating the DCG Cache
When changes are made to the catalog or product model, you can update the cache if you are using an off-platform solution. The Migrate Cache Records job enables you to migrate CachedAPIResponses from Salesforce to the Digital Commerce Gateway (DCG) running on AWS.
After a major upgrade of CME, you should clear the Redis cache on AWS.
Make sure you have completed the DCG OAuth2 Setup and Usage and received the credentials from Support. Throughout this topic, whenever we refer to OAuth2 credentials, use the cmig
set of credentials.
For information about configuring CPQ custom settings, see CPQ Configuration Settings Reference.
The DCG Cache Migration Batch job is dependent on the following custom settings. The custom settings store information about the DCG instance and must be configured before running the batch job:
-
CacheAPI.ExternalSystemPartitionKey
-
CacheAPI.ExternalSystemAuthHeader
-
CacheAPI.ExternalSystemURL
To configure Digital Commerce cache migration:
You can update the cache by running a batch job. The batch job does a full migration the first time it is run. On subsequent runs, the batch job performs an incremental migration based on the last synchronization timestamp.
-
Navigate to Vlocity CMT Administration > Cacheable API Jobs.
-
Click Start next to Migrate Cache Records.
You will be notified if the batch job was successful.
You can also initialize the cache using a remote API call.
The API migrates CachedAPIResponse__c records from the Salesforce platform and inserts them into the Redis (Remote Dictionary Server) cache on DCG. The API maintains a lastsynctimestamp on the Redis cache.
-
If no cache is generated on DCG or Salesforce, then run the Populate API Cache job first, then run the Migrate Cache Records job.
-
If the Salesforce cache-generated DCG is empty with no history of the last run, then run the Migrate Cache Records job.
-
If the Salesforce cache-generated DCG is empty with the history of the last run, then run the Populate API Cache job first, then run the Migrate Cache Records job.
-
If DCG has been updated with the Salesforce records but DCG is not synchronized with Salesforce, then run the Migrate Cache Records job. This will synchronize the recently updated records in the DCG cache with Salesforce.