Created
September 4, 2020 13:49
-
-
Save roberto-mardeni/6855008f3ec25db11d9fecc011a0227d to your computer and use it in GitHub Desktop.
Azure Cache for Redis Configuration Sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<appSettings> | |
<add key="RedisConnectionString" value="<name>.redis.cache.windows.net:6380,password=<key>,ssl=True,abortConnect=False" /> | |
</appSettings> | |
<system.web> | |
<compilation debug="true" targetFramework="4.7.2" /> | |
<httpRuntime targetFramework="4.7.2" /> | |
<sessionState mode="Custom" customProvider="RedisStateStore"> | |
<providers> | |
<add name="RedisStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" connectionString="RedisConnectionString" /> | |
</providers> | |
</sessionState> | |
<caching> | |
<outputCache defaultProvider="RedisOutputCache"> | |
<providers> | |
<add name="RedisOutputCache" type="Microsoft.Web.Redis.RedisOutputCacheProvider" connectionString="RedisConnectionString" /> | |
</providers> | |
</outputCache> | |
</caching> | |
</system.web> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment