Page Cache and Replication

Both code and data replication have page cache implications. Certain replication tasks automatically invalidate and refresh the cache, and you might want to clear the cache manually after running tasks that don't. 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.

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

Because a clear cache command can take up to 15 seconds to reach the web server, you might not see the cache update immediately. 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 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 below.

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 make the changes 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 several product prices are incorrect in the production instance. You correct the prices in Business Manager on the staging instance and replicate the changes to production using a replication process that is configured to skip page cache clearing. By performing this replication, you keep your price information in sync on both instances, and you ensure that the correct product prices appear in the basket (which is never cached). However, you also ensure that your storefront's product description pages show the old, incorrect prices until the scheduled page cache clearing occurs.

By skipping the automatic cache refresh, you accept the trade-off of incorrect prices on the product description pages in exchange for avoiding the performance hit of a production cache refresh. However, baskets in the production instance will reflect correct prices in sync with the staing instance.

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.

  • Always close your browser and clear your local cache to make sure the problem is not local to your system before manually clearing the cache in Business Manager.
  • If you want to manually clear the cache on the embedded CDN (all production and development environments), you should click Invalidate next to the Entire Page Cache for Site description. You don't need 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.

Related Links

Troubleshooting

Caching Content

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. By continuing to use this site you are giving us your consent to do this.