Beetle.redis is a lightweight, high-performance redis for .net client lib.

supports connection pooling and JSON,protobuf Data object on redis.

redis access let you more easily:)

home page:http://www.ikende.com/product/redis

Configuration

  • App.config
     <configSections>
        <section name="redisClientSection" type="Beetle.Redis.RedisClientSection, Beetle.Redis"/>
      </configSections>
      <redisClientSection dB="0" cached="" xmlns="urn:Beetle.Redis">
        <writes>
          <add host="192.168.0.121" connections="10"/>
        </writes>
        <reads>
          <add host="192.168.0.121" connections="10"/>
        </reads>
      </redisClientSection>
    
     
  • Default Client
    RedisClient.DefaultDB;
    
  • Create client
    Beetle.Redis.RedisClient db = new Redis.RedisClient("redisClientSection");
    

Using

  • Json
                 JsonKey rk = "henry_json";
    UserBase ub = new UserBase();
    ub.Name = "henryfan";
    ub.City = "gz";
    ub.Counrty = "cn";
    ub.Age = 10;
    rk.Set(ub);
    Assert.AreEqual(ub.Name, rk.Get<UserBase>().Name);
  • protobuf
                 ProtobufKey rk = "henry_protobuf";
    UserBase ub = new UserBase();
    ub.Name = "henryfan";
    ub.City = "gz";
    ub.Counrty = "cn";
    ub.Age = 10;
    rk.Set(ub);
    Assert.AreEqual(ub.Name, rk.Get<UserBase>().Name);

Documentation

Performance

Donate:

email:henryfan@msn.com

homepage:http://www.ikende.com

qq:28304340

Last edited Jan 19 at 9:08 AM by smarkhenry, version 38