我目前正在使用 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>
最佳答案
对于此特定错误:错误为:“CloudServices64:找不到启动任务 Microsoft.WindowsAzure.caching\ClientPerfCounterInstaller.exe 的名为“approot\bin\Microsoft.WindowsAzure.caching\ClientPerfCounterInstaller.exe”的文件myprojWebRole
的,请尝试进入 Web 角色项目属性的缓存选项卡来禁用角色内缓存:
关于asp.net - 使用 Redis 缓存替换 Windows Azure 缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35560192/