假设还没有配置Azure Power shell 能够參照这里进行配置:
http://blog.csdn.net/lan_liang/article/details/46850221

打开Azure Power Shell

1. 执行

Add-AzureAccount

(假设已经加入就不用了)

2. 执行 

New-AzureManagedCache -Name mycache -Location "South Central US" -Sku Basic -Memory 128MB

进到Azure Cache页面,能够看到Cache正在创建

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />


3. 进入https://portal.azure.com/#create/Microsoft.Cache.1.0.4创建Cache

4. 点击菜单Redis Caches 能够看到redis已经创建好了:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" style="font-size:14px;" alt="" />

5. 安装nuget package

6. Console Application的代码:

static void Main(string[] args)
{
ConnectionMultiplexer connection =
ConnectionMultiplexer.Connect("your_domain.redis.cache.windows.net,ssl=true,password=YourPrimaryKey"); IDatabase cache = connection.GetDatabase(); // Perform cache operations using the cache object...
// Simple put of integral data types into the cache
cache.StringSet("key1", "value");
cache.StringSet("key2", 25); // Simple get of data types from the cache
string key1 = cache.StringGet("key1");
Console.WriteLine(key1);
int key2 = (int)cache.StringGet("key2");
Console.WriteLine(key2); Console.Read();
}

PrimaryKey在这里看:

将代码中的"your_domain"替换为你的DNS。password替换为你的PrimaryKey

Windows Azure 系列-- Azure Redis Cache的配置和使用的更多相关文章

  1. Azure Redis Cache (4) 配置和管理Redis Cache

    <Windows Azure Platform 系列文章目录> 我们在创建完Azure Redis Cache后,经常需要切换Redis Cache的服务级别,这里我简单介绍一下使用Azu ...

  2. Windows Azure 系列-- Azure Queue的操作

    - Storage Account. 和之前介绍的Azure Table和AzureBlob一样.你须要一个StorageAccount,仅仅须要创建1次AzureStorageAccount就好了, ...

  3. 【Redis学习】:Windows环境下的Redis安装与配置

    Redis简介 REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统. Redis是一个开源的使用ANSI C ...

  4. Azure Redis Cache (3) 在Windows 环境下使用Redis Benchmark

    <Windows Azure Platform 系列文章目录> 熟悉Redis环境的读者都知道,我们可以在Linux环境里,使用Redis Benchmark,测试Redis的性能. ht ...

  5. Azure Redis Cache (2) 创建和使用Azure Redis Cache

    <Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的Azure China. 注意: 截至今日2015年10月7日,国内由世纪互联运维的Azur ...

  6. Azure Redis Cache (1) 入门

    <Windows Azure Platform 系列文章目录> Microsoft Azure Redis Cache基于流行的开源Redis Cache. 1.功能 Redis 是一种高 ...

  7. Azure Redis Cache (3) 创建和使用P级别的Redis Cache

    <Windows Azure Platform 系列文章目录> 在笔者之前的文档里面已经说明了,Azure Redis Cache分为三个不同的级别: - 基本,Basic,不包含SLA ...

  8. Azure Redis Cache

    将于 2014 年 9 月 1 日停止Azure Shared Cache服务,因此你需要在该日期前迁移到 Azure Redis Cache.Azure Redis Cache包含以下两个层级的产品 ...

  9. Azure Redis Cache (5) Redis Cache Cluster集群模式

    <Windows Azure Platform 系列文章目录> Redis Cluster 3.0之后的版本,已经支持Redis Cluster集群模式,Redis Cluster采用无中 ...

随机推荐

  1. Java概述--Java开发实战经典

    1)Java有三个发展方向,分别是Java SE,Java EE,Java ME.以下简要介绍. a.Java SE,Java Standard Edition(java标准版),包含了构成java语 ...

  2. msgfmt: command not found

    sudo apt-get install gettext

  3. md5代码实现

    参考: 1.http://blog.csdn.net/iaccepted/article/details/8722444 2.http://hi.baidu.com/gh0st_lover/item/ ...

  4. Swift,函数

    1.无参数无输出的函数 func a(){ print("HI") } a() //HI 2.有参数有输出的函数 func add(a:Int,b:Int)->Int{ // ...

  5. easyui textbox获取焦点事件

    $('#textboxid').textbox().next('span').find('input').focus(); $('#id').textbox('textbox').focus();

  6. js判断上传文件的大小、类型、修改日期等信息

    1.找到上传文件的前端代码,下断点,进行调试,使用jquery获得上传文件对象 2.鼠标放到文件对象fielEl上,弹出文件对象具体内容,可以看大文件对象的:上次修改时间.名字.大小.类型等信息 3. ...

  7. Yii2 关于时间格式的用法

    先添加配置文件: 'language' => 'zh-CN', 'timeZone' => 'Asia/Shanghai', 'components' => [ 'formatter ...

  8. [Javascript] Write a Generator Function to Generate the Alphabet / Numbers

    When you need to generate a data set, a generator function is often the correct solution. A generato ...

  9. ActiveMQ消息游标 --转载

    转:http://blog.csdn.net/m13321169565/article/details/8081358 在Activemq以前的版本中,broker会把待发送的消息保存在内存中.这种方 ...

  10. Quartz任务监听器

    在Quartz框架提供了JobListener接口,可在任务执行前.任务被拒绝及任务执行完成后实现对任务的拦截,该接口的声明如下: public interface JobListener { /** ...