---
title: "Configure Redis Cluster for distributed caching"
slug: "configure-redis-cluster-for-distributed-caching"
abstract: "How to change the configuration from stand-alone Redis to Redis Cluster for distributed caching."
---
# 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](https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-commerce/scaling-commerce-caches-with-redis-cluster.html "Scaling Commerce caches with Redis Cluster"). The default Sitecore XC deployment uses stand-alone Redis.

<details>
<summary><h2>Configure Commerce Engine caching to use Redis Cluster</h2></summary>

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"
    ```

</details>

<details>
<summary><h2>Configure CE Connect caching to use Redis Cluster</h2></summary>

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:

    ```xml
    <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>
    ```

</details>