Configure Azure Redis cache
Overview
When you upload your site on several instances in Azure or want to scale the instances, you need to prepare the communication infrastructure to transmit messages between the nodes - for example, to communicate cache invalidation. Sitefinity CMS uses Redis message sender that you must configure for NLB communication in Azure Web Apps.
NOTE: This article describes how to setup Redis cache in a load-balanced environment.
To learn how to setup Redis as a shared cache location, see Configure the cache provider.
Provision Redis server in Azure
To provision Redis cache for your Sitefinity CMS website, navigate to your Azure portal » Create a resource and on the Get Started pane, search for Azure Cache for Redis.
You need to configure a running instance of Azure Cache for Redis and get a connection string.
For more information, see Microsoft documentation » Use Azure Cache for Redis in ASP.NET app.
Configure Sitefinity to use Redis
Perform the following:
- In Sitefinity CMS backend, navigate to Administration » Settings » Advanced » System » LoadBalancing » Redis Settings » Connection String.
- In the Redis settings page that appears, enter the connection string and prefix key for all messages to be used from this site.
This enables using Redis from different client applications.
Ensure that the ConnectionString
field is in the following format:
$redisPrimaryKey@$redisCacheName.redis.cache.windows.net?ssl=true
For example,
yq2YLjsdlf34iwushrgesdeirkfs034jsdls493=@mydomain.redis.cache.windows.net?ssl=true
- Save your changes.
RECOMMENDATION: If you want to achieve failover redundancy for a production environment, we recommend using at least Azure Standard Pricing tier (C0+).
For more information about the different pricing tiers, see Redis Cache Pricing.
NOTE: Sitefinity CMS and Redis are completely decoupled and they can work both (or one of them) on on-premises infrastructure.