2

What does the "Refresh Commerce Cache" button in the Sitecore Content Editor exactly do?

Does it perform a REST call on the XC9 Commerce Engine? And if so, what would be the call (in Postman)?

7

I've decompiled the RefreshCacheCommand in the Sitecore.Commerce.Engine.Connect.dll assembly and apparently it clears the cache of the commerce data provider and then sitecore master and web databases:

CatalogRepository.DefaultCache.Clear();
CatalogRepository.MappingEntries = (ConcurrentDictionary<string, string>) null;
EngineConnectUtility.RefreshSitecoreCaches("master");
EngineConnectUtility.RefreshSitecoreCaches("web");

When the sitecore process starts, the commerce data provider retrieves the catalog from the commerce engine and caches it internally (In the mapping entries). Clearing the cache will clear these entries and the data provider will refresh the catalog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.