Page Cache and Replication

Both code and data replication have page cache implications. Certain replication tasks automatically invalidate and refresh the cache, and it can be a good idea to clear the cache manually after running some others.

To access the cache, select Administration > Sites > Manage Sites > sitename > Cache.

Note: In general, Salesforce B2C Commerce automatically clears the page cache only as needed.
Note: For information on caching, see Caching Content.

Clearing the page cache can create a heavy load on the application servers. Only clear the page cache manually when necessary, and avoid clearing it during times of high traffic.

Because a cache command can take up to 15 seconds to reach the web server, there can be a delay before you see the cache update. Account for this delay before reissuing the command.

A production instance has a 15-minute delay until all pages are refreshed for both automatic and manual cache refreshes. This delay ensures load distribution across application servers. On non-production instances, the page cache refreshes immediately.

Code Replication

The last step of the code replication process from staging to production automatically clears the cache. If you directly deploy code or page changes to production (not recommended), you must manually clear the cache.

Data Replication

The last step of the data replication process automatically invalidates and refreshes the cache by default, except in certain cases as described here.

You can configure a replication process to skip automatic cache clearing. However, use this feature with caution, because it can lead to inconsistent data in the storefront, the cause of which can be difficult to diagnose. Be sure you understand the scope of the changes that you are replicating, and keep them as small as possible.

For example, consider the following scenario. Your product description pages are cached for 24 hours, and the page cache is scheduled to be cleared the following night. You notice that several product prices are incorrect in the production instance. First, you correct the prices in Business Manager on the staging instance. Then you replicate the changes to production using a replication process that is configured to skip page cache clearing. This process keeps your price information in sync on both instances, and ensures that the correct product prices appear in baskets (which are never cached).

Skipping the automatic cache refresh also means that your storefront's product description pages show the old, incorrect prices until the scheduled page cache clearing occurs. However, this tradeoff also avoids the performance hit of a production cache refresh.

Catalogs Replicated Sites Where the Page Cache Is Cleared
All catalogs for all sites of an organization All storefront sites of this organization.
A single catalog that is assigned to one or more sites The sites to which the catalog is assigned.
A master catalog that isn't directly assigned to a site but serves as a product repository for one or more site or navigation catalogs The sites, as determined programmatically, of storefronts that offer products from the master catalog. The page caches of unrelated storefront sites aren't cleared.

Troubleshooting Cache Clearing

If you experience issues with the page cache, consider the following tips.

  • Before manually clearing the cache in Business Manager, always make sure that the problem isn’t local by closing your browser and clearing your local cache.
  • To manually clear the cache on the embedded CDN (all production and development environments), click Invalidate next to the Entire Page Cache for Site description. You don't have to also clear the static cache.
  • If you don't see an expected change, look for a pattern that could indicate a more specific problem. For example, are images not refreshing? If so, the image provider, such as Scene 7, could be having an issue. If a content asset is causing a problem, make sure it has been deployed.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.