Azure cache 的配置与应用

最近公司的项目要是用cloud Service 所以研究了下 Azure cache 的配置与使用。

首先创建项目

 第二步 配置 cache worker role

(1) 点击 cache worker role 项目的属性设置。

 

(2)属性Caching 设置

 

 第三步 添加代码到web项目的 web.config配置文件(identifier应该是Cache role name or Service Endpoint )我们使用的是Cache role name 说以是identifier="CacheWorkerRole" 。

        <dataCacheClients>
      <dataCacheClient name="default">
    <autoDiscover isEnabled="true" identifier="CacheWorkerRole" />
      </dataCacheClient>
    </dataCacheClients>
    <cacheDiagnostics>
    <crashDump dumpLevel="Off" dumpStorageQuotaInMB="100" />
    </cacheDiagnostics>

第四步 下载Azure cache 包

第五步:开始写自己的cache 代码

 

posted @ 2015-06-11 16:32  BeierWu  阅读(539)  评论(0编辑  收藏  举报