

For these reasons, it is very important to be able to clear the cached objects related to an updated product from the Redis cache store as soon as the product data has been updated in the Sitecore Commerce database. The discrepancy between what is stored in the actual Sitecore Commerce database and what a content author would see in Business Tools (the cached version of the entity) can cause a lot of confusion and potentially introduce data integrity issues. This means that it might take up to 2 hours to see product updates in Sitecore Commerce. The cache policy for the SellableItems cache is configured by default with an expiration period of 2 hours. When an existing entity version is updated, its cached object in the Redis cache store doesn’t get automatically deleted or refreshed.

Because the editorial activity for a product might last more than 10 minutes in the external product management system, the product import process doesn’t create a new entity version every time a product is updated, but instead edits all existing versions of the product SellableItem entity.

This process is executed by a commerce engine minion that runs every 10 minutes. In my project catalog product entities are not directly created in Sitecore Business Tools, instead they are managed in an external product management system and imported in Sitecore Commerce using a custom import process. In this blog post I describe how to implement a custom solution using the StackExchange.Redis library to clear commerce Redis cache keys via code.

Unfortunately the commerce website of one of my clients is on a previous version of the platform, Sitecore Experience Commerce 9.3, and these new commands are not available. Tags Always On Availability Groups ASP.NET Framework Automation Azure Kubernetes Service Azure Monitor Business Tools Container Insights Conversion Cookies Cost Reduction Coveo Cloud Coveo for Sitecore Database Recovery Database Restore Disaster Recovery Entrypoint Google Chrome Grafana http handler Installation Jenkins Jenkins Pipelines Learning Logging Metrics Monitoring Monitoring Sitecore on AKS Personalization Powershell Prometheus Redis Cache Routing SameSite Search security access Security Identities Sitecore 9.1 Sitecore 9.3 Sitecore 10 Sitecore Admin Tools Sitecore Commerce Sitecore Docker Sitecore Forms Sitecore Hackathon Sitecore Marketplace Modules Sitecore Modules Sitecore Pipelines Sitecore Publishing Service Sitecore WFFM sitemap SQL Server Unicorn Follow Blog via EmailĮnter your email address to follow this blog and receive notifications of new posts by email.Ī couple of weeks ago Sitecore Experience Commerce 10.2 has been released adding support for new commands in code to clear keys in cache stores managed with the Redis cache provider.
