---
schema_version: "1"
id: 59e3d0d4b2fd251d4a2322b7c0d563381dd996dd7aac44ae4c680e4f4f1b5a31
title: Prerequisites to Regenerate Cache
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-t-pre-requisites.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-t-pre-requisites.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 44a84532ea48e7f64b0fcf0aad368cf8b120ef6c785142b2d4dc12dc90e29479
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Prerequisites to Regenerate Cache

Before you begin the regenerate cache job, [prepare](https://developer.salesforce.com/docs/industries/cme/guide/comms-t-preparing-digital-commerce-api-caching.md) and [initialize](https://developer.salesforce.com/docs/industries/cme/guide/comms-t-populate-cache-job.md) the CPQ API cache.

Follow these steps to use the incremental cache regeneration feature:

1.  From **Setup**, in the Quick Find box, enter `Custom Settings`.

2.  Click **Custom Settings**.

3.  Go to **Trigger Setup**.

4.  Next to **Trigger Setup**, click **Manage**. The Trigger Setup page appears.

5.  Click Edit beside **CacheAPI.CacheManagement**, and turn on the trigger.

    If you do not see a trigger for **CacheAPI.CacheManagement**:

    1.  Click New.

    2.  Enter `CacheAPI.CacheManagement` in the **Name** field.

    3.  Click Trigger On.

    4.  Click Save.

    This ensures you can see catalog changes reflected in the cache after running the [Regenerate Cached API Records job](https://help.salesforce.com/s/articleView?id=ind.comms_regenerate_cached_api_records.htm&language=en_US&type=5).

    **important:** In the Winter '20 version of the software, there is a known issue with this trigger turned on that prevents you from importing large datapacks. To work around this issue, import datapacks with a batch size of one. Otherwise, the datapack import (deployment) fails due to excessive SOQL errors violating [Salesforce governor limits](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm). We recommend that you do not enable the Digital Commerce cache management trigger unless you are using Vlocity CME patch release Spring '20 107.1.1.

    If you do not use the incremental cache regeneration feature with Digital Commerce APIs, or if you want to import datapacks with a batch size larger than one, disable the cache management trigger.

6.  Ensure the following picklist values are added to their appropriate object fields specified [here](https://help.salesforce.com/s/articleView?id=ind.comms_picklist_value_activation.htm&type=5):

    - CachedAPIChange: vlocity_cmt**ChangeType**c

    - CachedAPIChange: vlocity_cmt**CodeType**c

7.  Run the following Maintenance Jobs from Vlocity CMT Administration each time changes are made to the product catalog.:

    - [Product Hierarchy Maintenance](https://help.salesforce.com/s/articleView?id=ind.comms_product_hierarchy_maintenance.htm&type=5)

    - [Clear Managed Platform Cache](https://help.salesforce.com/s/articleView?id=ind.comms_clear_managed_platform_cache.htm&type=5)

    **note:** To register only the changes for a new version of the calculation matrix:

    1.  Turn off the `CacheAPI.CacheManagement` trigger.

    2.  Update the calculation matrix-related data, which requires creating a new version of the calculation matrix.

    3.  Turn on the `CacheAPI.CacheManagement` trigger.

    4.  Go to **All Tabs** -> Vlocity Calculation Matrix. Select the currently active matrix from **Related list** -> Vlocity Calculation Matrix Versions.

    5.  Under **Vlocity Calculation Matrix Version** , search for Related Lis -> **Vlocity Calculation Matrix Row**, which should display all available matrix rows.

    6.  Search for the row on which the CRUD operation was performed to ensure only the changes get registered.

    7.  Click Edit and save the record.

    8.  Run the Clear Managed PlatformCache and Product Hierarchy Maintenance jobs from CMT Administration.

    9.  Run the Regenerate Batch job.
