C # using Redis

Source: Internet
Author: User
Tags memcached

Concept

Redis is an open source, write with ANSI C language, support network, memory-based and persistent, Key-value database, and memcached similar, it supports storage of the value type is relatively more, including string (string), list (linked list), Set (set), Zset (sorted set--ordered set), and hash (hash type). Based on this, Redis supports sorting in a variety of different ways. As with memcached, data is cached in memory to ensure efficiency. The difference is that Redis periodically writes the updated data to disk or writes the modified operation to the appended record file, and Master-slave (Master-Slave) synchronization is implemented on this basis.

Redis supports master-slave synchronization. Data can be synchronized from the primary server to any number of slave servers, from the server to the primary server that is associated with other slave servers. This enables Redis to perform single-layer tree replication. You can write to the data intentionally or unintentionally.

Download

1. Download the installation package: Https://github.com/dmajkic/redis/downloads

2. After the installation package download, according to the operating system to select the corresponding version of the file, there will be several DLLs are:

Redis-server.exe: Service Program
Redis-check-dump.exe: Local Database check
Redis-check-aof.exe: Update log check
Redis-benchmark.exe: Performance test to simulate the simultaneous sending of M-Sets/gets queries by n clients.
Redis-cli.exe: After the server is turned on, our clients can enter various commands to test

CMD mode operation

1. First open cmd as an Administrator (window +r) and go to the location where the installation package was downloaded. Input: Redis-server.exe redis.conf turn on Redis service.

2. After opening the service, open cmd, use redis-eli.exe-h 127.0.0.1-p 6379

You need to prepare three DLLs before calling the Redis service. : Https://github.com/ServiceStack/ServiceStack.Redis can be referenced in the project.

Below we start using C # to connect Redis
Store the data, and then query the data.

This is the introduction of so many, there is time to continue to update, thank you for the close look.

C # using 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.