【发布时间】:2017-06-24 11:31:30
【问题描述】:
我正在尝试为我的 OutputCache 连接到 Redis,我已在 web.config 中进行了配置(对于 localhost,一切正常)
<system.web>
<caching>
<outputCache defaultProvider="localRedisOutputCache">
<providers>
<add name="localRedisOutputCache" type="Microsoft.Web.Redis.RedisOutputCacheProvider" host="127.0.0.1" accessKey="" ssl="false" />
</providers>
</outputCache>
</caching>
</system.web>
但是当我更改为我的 Azure Redis 时,它无法正常工作...
<system.web>
<caching>
<outputCache defaultProvider="remoteRedisOutputCache">
<providers>
<add name="remoteRedisOutputCache" type="Microsoft.Web.Redis.RedisOutputCacheProvider" host="{{myName}}.redis.cache.windows.net" accessKey="{{MyAccessKey}}" ssl="true" />
</outputCache>
</caching>
</system.web>
我已阅读this article 并测试了所有可能性,但没有结果。我没有异常,并且解决方案可以正确编译。
我错过了什么?
谢谢!
【问题讨论】:
标签: asp.net-mvc azure caching redis outputcache