【发布时间】:2016-06-04 06:23:07
【问题描述】:
我目前正在使用 Windows Azure 缓存进行缓存,但是我想使用 Redis 缓存。我尝试从我的项目中删除 Windows Azure 缓存包并添加了 Redis 缓存包,并进行了适当的配置。
但是这似乎不起作用,并且给了我很多构建错误,因为我相信它仍在寻找 Windows Azure 缓存。
我将如何解决这个问题并成功切换到 Redis 缓存?
我还想知道我是否应该从我的 WebRole 的 Web.config 文件中删除此部分?
<dataCacheClients>
<dataCacheClient name="default">
<!--To use the Windows Azure Cache Service, set identifier to be the endpoint of the cache cluster -->
<autoDiscover isEnabled="true" identifier="testingabc.cache.windows.net" />
<!--<localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />-->
<!--Use this section to specify security settings for connecting to your cache. This section is not required if your cache is hosted on a role that is a part of your cloud service. -->
<securityProperties mode="Message" sslEnabled="true">
<messageSecurity authorizationInfo="MyAuthInfo" />
</securityProperties>
</dataCacheClient>
【问题讨论】:
-
您可能希望在您的问题中添加这些构建错误的描述。
-
只是意料之中? Redis 并不是 Windows Azure 缓存的替代品。这些包没有实现相同的 API。
-
错误是:“CloudServices64:Cannot find the file named 'approot\bin\Microsoft.WindowsAzure.caching\ClientPerfCounterInstaller.exe' for start task Microsoft.WindowsAzure.caching\ClientPerfCounterInstaller.exe of myprojWebRole
-
@TimLovell-Smith 那么我将如何进行更改?
标签: asp.net azure caching redis stackexchange.redis