Redis Installation
$ wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz
$ tar xzf redis-2.6.13.tar.gz
$ cd redis-2.6.13
$ make
Redis Boot
$ src/redis-server
Redis Simple test:
$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"
Complex tests:
./runtest (Note: to first install TCL 8.5 tk 8.5, sudo apt-get install TK)
This command will run an official test program. Look at the final conclusion: all tests pass successfully.
This allows the client to connect.
There are a lot of client software, in this connection there is a list: http://redis.io/clients
Most familiar with C #, choose a C # client, Servicestack.redis This can be found in the NuGet interface. Locate and then join the project.
Using servicestack.redis;using System.diagnostics;namespace consoleapplication1{class Program {static void Main (string[] args) {Stopwatch sw = new Stopwatch (); Sw. Start (); using (var client = new Redisclient ("192.168.63.134")) {for (int i = 0; i < 100000; i++) {Client. ADD ("key" + I, I); }} SW. Stop (); System.Console.WriteLine ("It takes" + SW. Elapsedmilliseconds + "Ms to add 100000 key to Redis"); Sw. Restart (); using (var client = new Redisclient ("192.168.63.134")) {for (int i = 0; i < 100000; i++) {Client. Get ("key" + i); }} SW. Stop (); System.Console.WriteLine ("It takes" + SW. Elapsedmilliseconds + "Ms to get 100000 key from Redis"); System.Console.ReadKey (); } }}
My machine runs the result: about 14 seconds to store 100,000 keys, about 14 seconds to remove 100,000 keys.
Article Source: Redis Introductory Learning
Learn to get started with Redis