10.2
  1. Administration

Configure Redis Cluster for distributed caching

You can change the configuration of an existing Sitecore XC deployment to use your Redis Cluster to scale distributed caching. The default Sitecore XC deployment uses stand-alone Redis.

Configure Commerce Engine caching to use Redis Cluster

To change Commerce Engine caching configuration to use Redis Cluster:

  • In the config.json file of the Commerce Engine instance running the Authoring service, for example inetpub\wwwroot\CommerceAuthoring_Sc\wwwroot\config.json, in the "Caching" section, under "Redis", and then under "Options", update the "Configurations" property with the appropriate connection string.

    Note

    The connection string does not specify a database. Redis Cluster only supports one database, and uses database 0 by default.

    For example:

    
    "Caching":
           ...
               "Redis":  {
                          ...
                             "Options":  {
                                           "Configuration":  "<YOUR_REDIS_CLUSTER:PORT>",
                                           "instanceName:  "Redis"

Configure CE Connect caching to use Redis Cluster

To change CE Connect caching configuration to use Redis Cluster:

  • In the inetpub\wwwroot\<storefront>\App_Config\Include\Y.Commerce.Engine\Sitecore.Commerce.Engine.Connect.config file, in the Redis options configuration section, update the <configuration> settings with the appropriate connection string.

    Note

    You must remove the defaultDatabase=1 from the configuration. Redis Cluster only supports one database, and uses database 0 by default.

    For example:

    <redis type="Sitecore.Commerce.Engine.Connect.RedisCacheSettings, Sitecore.Commerce.Engine.Connect.Caching">
              ...
               <options type="Sitecore.Commerce.Engine.Connect.CommerceRedisCacheOptions, Sitecore.Commerce.Engine.Connect.Caching">
                <configuration>YOUR_REDIS_CLUSTER,allowAdmin=true,syncTimeout=3600000</configuration>
                <instanceName>Redis</instanceName>
              </options>
            </redis>
If you have suggestions for improving this article, let us know!