Windows Azure 系列-- Azure Redis Cache的配置和使用
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的配置和使用的更多相关文章
- Azure Redis Cache (4) 配置和管理Redis Cache
<Windows Azure Platform 系列文章目录> 我们在创建完Azure Redis Cache后,经常需要切换Redis Cache的服务级别,这里我简单介绍一下使用Azu ...
- Windows Azure 系列-- Azure Queue的操作
- Storage Account. 和之前介绍的Azure Table和AzureBlob一样.你须要一个StorageAccount,仅仅须要创建1次AzureStorageAccount就好了, ...
- 【Redis学习】:Windows环境下的Redis安装与配置
Redis简介 REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统. Redis是一个开源的使用ANSI C ...
- Azure Redis Cache (3) 在Windows 环境下使用Redis Benchmark
<Windows Azure Platform 系列文章目录> 熟悉Redis环境的读者都知道,我们可以在Linux环境里,使用Redis Benchmark,测试Redis的性能. ht ...
- Azure Redis Cache (2) 创建和使用Azure Redis Cache
<Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的Azure China. 注意: 截至今日2015年10月7日,国内由世纪互联运维的Azur ...
- Azure Redis Cache (1) 入门
<Windows Azure Platform 系列文章目录> Microsoft Azure Redis Cache基于流行的开源Redis Cache. 1.功能 Redis 是一种高 ...
- Azure Redis Cache (3) 创建和使用P级别的Redis Cache
<Windows Azure Platform 系列文章目录> 在笔者之前的文档里面已经说明了,Azure Redis Cache分为三个不同的级别: - 基本,Basic,不包含SLA ...
- Azure Redis Cache
将于 2014 年 9 月 1 日停止Azure Shared Cache服务,因此你需要在该日期前迁移到 Azure Redis Cache.Azure Redis Cache包含以下两个层级的产品 ...
- Azure Redis Cache (5) Redis Cache Cluster集群模式
<Windows Azure Platform 系列文章目录> Redis Cluster 3.0之后的版本,已经支持Redis Cluster集群模式,Redis Cluster采用无中 ...
随机推荐
- Linux 命令缩写部分解释
转:http://blog.chinaunix.net/uid-28408358-id-3890783.html bin = BINaries /dev = DEVices /etc = ETCe ...
- Quartz 2.3 动态添加、修改和删除定时任务
下面直接上代码: <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>qu ...
- Bootstrap响应式折叠导航
浏览器宽度缩小到一定值时,导航显示为 <nav class="navbar navbar-inverse navbar-fixed-top" role="navig ...
- C#的Xamarin开发小米盒子应用并以WCF实现微信通知
对于熟悉C#语言的开发人员而言,用Xamarin开发Android应用也是一个不错的选择.小米盒子是Android系统.当然也就能够使用Xamarin来开发.首选来看效果图. watermark/2/ ...
- HTC VIVE SDK 中的例子 hellovr_opengl 程序流程分析
最近Vive的VR头盔设备很火,恰逢项目需求,所以对 SDK 中的例子 hellovr_opengl 做了比较细致的代码分析,先将流程图绘制如下,便于大家理解. 在ViVe头盔中实现立体效果的技术核心 ...
- CreatarGlobe实现多机立体显示方案(初稿)
CreatarGlobe实现多机立体显示方案(初稿) 关键字 : 集群渲染 立体显示 大屏幕 边缘融合 多机同步 多机同步显示 关键字: 大屏幕投影融合系统解决方案 集群渲染 多机3D同步显示又称“集 ...
- 处理 WebService 中的 Map 对象
最近,我们讨论了关于 WebService 的相关问题.目前在 Smart 中,可发布两种类型的 WebService,它们是:SOAP 服务 与 REST 服务,您可以根据需要自由选择. 今天,我要 ...
- 贯通Spark Streaming流计算框架的运行源码
本章节内容: 一.在线动态计算分类最热门商品案例回顾 二.基于案例贯通Spark Streaming的运行源码 先看代码(源码场景:用户.用户的商品.商品的点击量排名,按商品.其点击量排名前三): p ...
- Shell实现循环执行curl向Solr导入json文件
#!/bin/bash for file in ./文件夹名/* do echo $file curl "http://IP:8983/solr/集合名/update?commit=true ...
- 【转】Spring Annotation 详解
(1) .<context:component-scan base-package="*.*" /> 该配置隐式注册了多个对注解进行解析的处理器,如: Autowire ...