New and configuration for C # Azure distributed cache Redis

Source: Internet
Author: User
Tags download redis

1. Introduction

Redis is an open source, BSD-licensed, Advanced key-value (Key-value) cache and Storage (store) system. Because Redis keys include string,hash,list,set,sorted Set,bitmap and Hyperloglog, they are often referred to as data structure servers. You can run atomic operations on these types, such as appending strings, increasing the values in the hash, adding an element to the list, calculating the intersection of the set, the set and the difference set, or the element that gets the highest rank from the ordered collection.

To meet high performance, Redis uses a memory (in-memory) DataSet (DataSet). Depending on your usage scenario, you can either dump the dataset to disk at intervals or append each command to the log to persist. Persistence can also be disabled if you just need a feature-rich, networked memory cache.

Redis is one of the NoSQL (no only SQL, non-relational) databases that NoSQL stores data in the form of Key-value. The current mainstream distributed cache technology has REDIS,MEMCACHED,SSDB,MONGODB and so on. Redis can be understood as a caching technique, because its data is cached from it, and it can be understood as a database, because Redis may periodically write data to disk or append operations to a log file. Because of the complex, high concurrency and big Data features of the Internet application business, it is the various caching technologies that are introduced to the ultimate goal.

2. Create a redis with the cloud interface

1) Log in with your account https://portal.azure.cn

2) New data+storage–> Redis Cache

3) Define your own name, resource group, location, pricing tier according to your needs

4) Turn on Redis. Resource group, Ceslightgroup. You can see that there is a ceslight cache

Then click Ceslight to see the details of the cache

3. Write the cache in code

Using code to invoke the cache is simple, just log in to the cache, and then do the operation of adding or deleting the check.

using Servicestack.redis; // Create Cache protected New Redisclient ("ceslight.redis.cache.chinacloudapi.cn"6379 " Qpamikoqdrb9c15z3noqah/xxxxxxxxxxxx"0);

Above new Redis, the first parameter is the cache host address, the second parameter is the default port, the third is the secret key, the fourth general write 0.

Click to open the show access key, you can see. We are using the main secret key.

4. Use software to see Redis

1) Download Redis https://redisdesktop.com/

2) After successful installation, open Redisdesktopmanager

Below we connect above to create a successful redis,name is random input, host is fill the host address above, port is generally 6379,auth is your secret key.

After clicking Test Connection, we can see the success

3) The main interface after login

You can see that the main interface after successful login is as follows:

Generally, it is recommended that a db be stored in one type of object. For example, db0 the string type and db1 the object.

Open a random object and we can see. (I wrote here that the Key-value method was stored in it)

New and configuration for C # Azure distributed cache Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.