---
schema_version: "1"
id: dcfb24db837fea77670951f28110e8c226a43623101affbdc727be99e643d6d6
title: Refresh Platform Cache
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_refresh_platform_cache.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_refresh_platform_cache.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e8594acfe246826f85c7f0b650349f99721e014ad6d67d605c9f233395b4d655
description: This job copies product hierarchy data to the platform cache and rebuilds the product attribute cache.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Refresh Platform Cache

This job copies product hierarchy data to the platform cache and rebuilds the product attribute cache.

Run the Product Hierarchy Maintenance job before running Refresh Platform Cache in order for changes in product bundles to be reflected in your implementation.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col>
        <col>
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d273942e35">
            <p style="margin-bottom:0;">Applies to</p>
          </th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d273942e41">
            <p style="margin-bottom:0;"> Winter '19 and later releases</p>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e35 ">
            <p style="margin-bottom:0;">Apex Name</p>
          </td>

          <td data-label="Winter '19 and later releases" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e41 ">
            <p>
              <span class="apiname">ProductHierarchyBatchProcessor</span>
            </p>
            <p style="margin-bottom:0;">
              <span class="apiname">ProductAttributesBatchProcessor</span>
            </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e35 ">
            <p style="margin-bottom:0;">Where to Run This Job</p>
          </td>

          <td data-label="Winter '19 and later releases" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e41 ">
            <p style="margin-bottom:0;">CMT Administration tab</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e35 ">
            <p style="margin-bottom:0;">Risks of Running This Job</p>
          </td>

          <td data-label="Winter '19 and later releases" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e41 ">
            <p>HIGH RISK</p>
            <p>Can cause orders to fail in a live production environment.</p>
            <p>Because this job includes price books that Vlocity doesn't use, it can take longer to complete if you have more price books. The time for completing this job run can vary. You can exclude non-Vlocity price books by running the following code:</p>
            <ol>
              <li>
                <p>From&nbsp;<strong class="uicontrol">Setup</strong>, click&nbsp;<strong class="uicontrol">Developer Console</strong>.</p>
              </li>

              <li>
                <p>From the&nbsp;<strong class="uicontrol">Debug</strong> menu, click&nbsp;<strong class="uicontrol">Open Execute Anonymous Window</strong>.</p>
              </li>

              <li>
                <p>Enter the appropriate code, and click&nbsp;<strong class="uicontrol">Execute</strong>.</p>
              </li>

              <li>
                <p>Enter the price book ID.</p>
              </li>

            </ol>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>Map&lt;String, Object&gt; input = new Map&lt;String, Object&gt;{'methodName' =&gt; 'refreshPriceBook', 'priceBookId' =&gt; 'price book ID'};

vlocity_cmt.TelcoAdminConsoleController controllerClass = new vlocity_cmt.TelcoAdminConsoleController();

controllerClass.setParameters(JSON.serialize(input));

controllerClass.invokeMethod();</code></pre>
          </td>

        </tr>
        <tr class="">
          <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e35 ">
            <p style="margin-bottom:0;">When Not to Run This Job</p>
          </td>

          <td data-label="Winter '19 and later releases" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e41 ">
            <p>Avoid running this job in a production environment outside of scheduled downtimes because of the risks.</p>
            <p style="margin-bottom:0;">You can run this job in a production environment during off-peak hours or planned downtime. This job can take a long time to run, as noted in the Risks of Running This Job section. When a production environment is in use and this job is run, order capture might have inconsistent results.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e35 ">
            <p style="margin-bottom:0;">When to Run This Job</p>
          </td>

          <td data-label="Winter '19 and later releases" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e41 ">
            <p style="margin-bottom:0;">After changing product bundles, product cardinality, or filterable attributes in Vlocity Product Console.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e35 ">
            <p style="margin-bottom:0;">More Information</p>
          </td>

          <td data-label="Winter '19 and later releases" class="slds-cell-wrap" style="vertical-align:top;" headers="d273942e41 ">
            <p>If you see the error message "Too many query rows: 50001" when you run this job, go to <strong class="uicontrol">Vlocity CMT Administration &gt; CPQ Configuration Setup</strong>, and set <strong class="uicontrol">CacheEnabled</strong> to <kbd>False</kbd>. By default, this custom setting is set to True. The issue appears when the number of entries in a pricebook exceeds certain limits.</p>
            <p>The Refresh Pricebook job runs on all products of an active price book. It doesn’t filter Salesforce Industries products.</p>
            <p>The Refresh Pricebook job calls two jobs to:</p>
            <ul>
              <li>
                <p>Copy the product hierarchies in the data store to the org cache in the platform cache for every product bundle.</p>
              </li>

              <li>
                <p>Copy filterable product attributes to the sObject cache that stores filterable attributes.</p>
              </li>

            </ul>
            <p>If the Refresh Pricebook job can’t refresh one of the price books, the job moves to the next price book. It notifies you if refreshing any of the price books fails.</p>
            <p>Starting in the Winter '18 release, this job (formerly Refresh Pricebook) is available in the Maintenance Jobs list in the CMT Administration screen.</p>
            <p>You can use the following Apex method to programmatically run the Product Hierarchy Maintenance, Clear Managed Platform Cache, and Refresh Platform Cache jobs in sequence:</p>
            <p>
              <code>CMTAdminJobService.startProductHierarchyMaintenanceJob(pricebookId)</code>
            </p>
            <p>To run these jobs on all price books, substitute <code>null</code> for the price book ID.</p>
            <p>If you see the <samp class="msgph">Too many DML rows: nnnn</samp> error message, increase the value of the <a href="https://help.salesforce.com/s/articleView?id=ind.comms_t_cpq_configuration_settings_reference_148927.htm&amp;release=264.0.0&amp;type=5" title="​Salesforce Industries Communications, Media, and Energy includes these custom settings that control many configure, price, quote (CPQ) features and behaviors.">PriceBookRefreshBatchSizeCPQ Configuration Settings Reference</a> configuration setting to eliminate it next time you run this job.</p>
            <p style="margin-bottom:0;">You can configure the <a href="https://help.salesforce.com/s/articleView?id=ind.comms_t_cpq_configuration_settings_reference_148927.htm&amp;release=264.0.0&amp;type=5" title="​Salesforce Industries Communications, Media, and Energy includes these custom settings that control many configure, price, quote (CPQ) features and behaviors.">ProductAttributesBatchProcessorSize and ProductHierarchyBatchProcessorSizeCPQ Configuration Settings Reference</a> configuration settings to avoid exceeding Salesforce governor limits.</p>
          </td>

        </tr>
      </tbody>
    </table>