2013年10月11日 星期五

ServiceStack.Redis, C#

https://github.com/ServiceStack/ServiceStack.Redis

Redis Client API Overview

image

 

4 Types of RedisClients

image

You can choose the layer of abstraction to work with

1. ICacheClient:

2. IRedisNativeClient: same command in C# and native client but in binary data format

3. IRedisClient: higher level of redis client

4. IRedisTypedClient:

 

Using NuGet to Install

image

image

 

Example 1, IRedisNativeClient

image

image

 

Example 2, IRedisClient

image

image

image

image

 

Example 3, IRedisTypedClient

image

image

image

image

image

 

Example 4, Transcation

image

image

image

 

Example 5, Pub and Sub

image

image

image

沒有留言:

張貼留言