This project is read-only.

add section to app.config for begin use beetle.redis lib

  • app.config
     <configSections>
        <section name="redisClientSection" type="Beetle.Redis.RedisClientSection, Beetle.Redis"/>
      </configSections>
      <connectionStrings>
      <redisClientSection dB="0" cached="" xmlns="urn:Beetle.Redis">
        <writes>
          <add host="192.168.0.108" connections="10"/>
        </writes>
        <reads>
          <add host="192.168.0.108" connections="10"/>
        </reads>
      </redisClientSection>
    
  • default db
    RedisClient.DefaultDB
    
  • create db
    Beetle.Redis.RedisClient db = new Redis.RedisClient("redisClientSection");
  • use default db
    RedisKey rk = "henry_protobuf".RedisProtobuf();
    rk.Get<UserBase>()
  • or
    Beetle.Redis.RedisClient db = new Redis.RedisClient("redisClientSection");
    RedisKey rk = "henry_protobuf".RedisProtobuf();
    rk.Get<UserBase>(db)

Last edited Aug 17, 2013 at 8:27 AM by smarkhenry, version 11

Comments

No comments yet.