When using Sitecore Commerce powered by Microsoft Dynamics, getting inventory information in real time can be an expensive operation and is often unnecessary.
The GetStockInformation processor does not provide the ability to cache the inventory information for situations when this information is not required in real time. The inventory information request into Microsoft Dynamics can take several seconds, and without the ability to cache the response, this can dramatically affect overall solution performance, because such a call would be made every time product details are requested.
In order to provide flexibility and improve performance for situations when only a single inventory is used, the GetStockInformation processor has been modified to provide a mechanism to cache product inventory information.
The improvement is provided inside the Sitecore.Commerce.DynamicsIntegration.Connect.8.0.127.0.update package that you can installed on a clean or updated solution using Sitecore Update Installation Wizard, available at the following link:
http://<your Sitecore site>/sitecore/admin/UpdateInstallationWizard.aspx
This change is backwards compatible with existing configurations, however, there are new configuration options that you can use to fine-tune the caching options.
The GetStockInformation processor configuration can be changed in the following file:
\App_Config\Include\DynamicsRetail\DynamicsRetail.Connectors.Inventory.config
The following configuration parameters are available:
<param desc="InventoryCacheTimeout">1</param>
<param desc="InventoryCacheEnabled">False</param>